If your have a WiFi connection, how do you find out if your computer is connected to WiFi or not? The command netsh interface
is used to find your WiFi connection status from command prompt.
Execute the below command to know WiFi connection status
netsh interface show interface | findstr /C:"Wireless" /C:"Name"
Example on my Windows 7 computer
C:\>netsh interface show interface | findstr /C:"Wireless" /C:"Name"
Admin State State Type Interface Name
Enabled Connected Dedicated Wireless Network Connection
As you can see, the command shows that Wifi connection is connected when we ran the command.
If the computer has WiFi enabled, but not connected to any network, then the command output would be like below.
C:\>netsh interface show interface | findstr /C:"Wireless" /C:"Name"
Admin State State Type Interface Name
Enabled Disconnected Dedicated Wireless Network Connection
If the Wifi is disabled, then the output would be
C:\>netsh interface show interface | findstr /C:"Wireless" /C:"Name"
Admin State State Type Interface Name
Disabled Disconnected Dedicated Wireless Network Connection
This command helps to know the status manually. However if we want to know the status in a script, we would need to refine the command further.
Related posts:
How to enable/disable WiFi from command line
netsh interface show interface | findstr /C:”Wireless” /C:”Name”
that does nothing??
David, the command works! Make sure copying the command is not messing up the quotes. Try typing in the command if it still doesn’t work.
try
netsh interface show interface | findstr /C:”Wi-Fi” /C:”Name”
In some cases you may need to change C:”Wireless” to C:”Wi-Fi”
Thanks your suggestion worked.
This will wireless/wifi status regardless if your computer says wifi or wireless:
netsh interface show interface | findstr /i “wifi wireless”
My Wi-Fi is turned on in the Settings but the panel at bottom corner when the network icon is clicked shows it as turned off and does not show any networks. What to do? Thanks.