netsh wlan show profile name="Your_SSID_Here" key=clear Look for the line labeled "Key Content."
netsh wlan show profiles
6 minutes
netsh interface ipv4 add route 10.0.0.0/16 "Ethernet" 192.168.1.1 store=persistent Listen on port 8080, forward to port 80 on 192.168.1.50
Netsh (Network Shell) is a command-line utility present in every version of Windows since NT 4.0. It allows you to display, modify, or script the network configuration of your local (or remote) machine. netsh commands
netsh interface portproxy add v4tov4 listenport=8080 connectaddress=192.168.1.50 connectport=80 While netsh can manage ARP , HTTP , WinRM , and RAS , stick to the common commands above until you are comfortable. Misusing netsh http delete sslcert can break IIS and Remote Desktop instantly. Cheat Sheet Summary | Task | Command | | :--- | :--- | | Reset network stack | netsh winsock reset | | See WiFi password | netsh wlan show profile name="SSID" key=clear | | Backup firewall rules | netsh advfirewall export backup.wfw | | Set static IP | netsh interface ip set address "Ethernet" static 10.0.0.2 255.0.0.0 10.0.0.1 | | Create port forward | netsh interface portproxy add v4tov4 listenport=8080 connectport=80 | Final Thoughts Netsh isn't glamorous. It has a steeper learning curve than PowerShell's Get-NetAdapter , but it is always available. Whether you are repairing a corporate laptop via remote command line or hacking your own forgotten WiFi password, netsh gets the job done with zero bloat.
netsh advfirewall firewall add rule name="Block_Notepad" dir=out program="C:\Windows\notepad.exe" action=block Your laptop remembers every Wi-Fi network you have ever joined. Netsh will happily print those passwords in plain text. Misusing netsh http delete sslcert can break IIS
netsh advfirewall show allprofiles