Skip to main content

Online commands

In this section I'll explore some commands that require an internet connection to use.

Managing your connection

Wondering what your IP-address is? use:

ipconfig

This doesn't show all the information tho, for that you can use

ipconfig /all

If you for some reason want a new IP-address:

ipconfig /release && ipconfig /renew

That does it for every interface however, but you can specify which one:

ipconfig /release "Wi-Fi" && ipconfig /renew "Wi-Fi"

Want to know what dns websites your pc knows?:

ipconfig /displaydns

and get rid of them:

ipconfig /flushdns

You can find out the ip-addresses of a website with:

nslookup advanced-windows.netlify.app

Or open it directly:

start https://advanced-windows.netlify.app

Netsh

Easily find all your wifi laptops networks:

netsh wlan show profile

You can even see the wifi password (replace 'wifinetwork' with the desired network name):

netsh wlan show profile 'wifinetwork' key=clear | findstr "Key Content"

Or to see all the stored wifi passwords (this is actually almost scripting in cmd):

for /f "skip=9 tokens=1,2 delims=:" %i in ('netsh wlan show profiles') do @if "%j" NEQ "" (echo SSID: %j & netsh wlan show profiles %j key=clear | findstr "Key Content") & echo

Let netsh generate a report of you wifi activity:

netsh wlan show wlanreport

You can show your interfaces using:

netsh interface show interface

Find your IP-addresses with netsh:

netsh interface ip show address | findstr “IP Address”

And your dnsservers:

netsh interface ip show dnsservers

You can even turn your firewall off or on using netsh:

netsh advfirewall set allprofiles state off
netsh advfirewall set allprofiles state on

Curl

If you don't trust shortened links, you can 'unshorten' them with curl:

curl --head --location "https://tinyurl.com/tbfdev5e" | findstr location

Check your public IP-address:

curl checkip.amazonaws.com

Create a QR code for a url:

curl qrenco.de/https://advanced-windows.netlify.app

Search the definition of a word:

curl dict.org/d:advanced

Testing connection

You can test wether websites are up or not with ping, which in turn also tests your own connection, make it go continues with /t:

ping 8.8.8.8 /t

I ping 8.8.8.8 because it's easy to remember and is practically always up. You can cancel the continues ping with Ctrl + C (that's true for every command by the way).

tracert will show you what path you take when you go to a website:

tracert 8.8.8.8

You can see everything that is connected to you and vice-versa with:

netstat

To see all your open ports:

netstat /af

To see all Process ID's of the connections so you can kill the connection with taskkill:

netstat -o

netstat can also show you some sent & received statistic:

netstat /e /t 5

You can see the routing table of your computer, what routes it will take to get to certain networks:

route print

Or add and delete routes:

route add 192.168.40.0 mask 255.255.255.0 10.7.1.44
route delete 192.168.40.0