≡ Menu

Check if WiFi is connected

If your computer has a WiFi connection, how do we know if it’s connected or disconnected? 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

0 comments… add one

Leave a Comment