Connect to a given WLAN profile
C:\> netsh wlan connect PROFILE
C:\> netsh wlan connect "PROFILENAME WITH SPACES"
It's then also possible to disconnect from the connected profile with
C:\> netsh wlan disconnect
Show Wi-Fi passwords
If a WiFi
password was forgotten, the stored password for a given WLAN profile can be revealed in a command line prompt such as
cmd.exe. For example, if the profile name is
Living Room:
C:\> netsh wlan show profile "Living Room" key=clear
Because the output is a bit verbose, the line that reveals the password can be searched for by piping the output of
netsh
into
findstr.exe
:
C:\> netsh wlan show profile "Living Room" key=clear | findstr.exe /c:"Key Content"
In a German installation of Windows, the text to search for is Schlüsselinhalt.
Opening a port and forwarding its incoming connections to an application listening a port
The following combination of netsh
commands was helpful to me to open port 11521 and to forward it to an Oracle listener which listened on poart 1521:
netsh advfirewall firewall add rule name="Oracle Connections" dir=in action=allow protocol=TCP localport=11521
netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=11521 connectaddress=localhost connectport=1521
In order to delete the firewall rule:
netsh advfirewall firewall delete rule name="Oracle Connections"