Categories: Network

Check if WiFi is connected

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.

Srinivas

View Comments

Share
Published by
Srinivas

Recent Posts

Add new user account from command line (CMD)

Adding users from command line is much easier than going through the UI. It saves…

4 years ago

Delete directory from command line [Rmdir]

Do you want to delete a directory from Windows command prompt(CMD)? This post explains how…

4 years ago

TaskKill: Kill process from command line (CMD)

We can kill a process from GUI using Task manager. If you want to do…

4 years ago

Kill Chrome from command line

Chrome is definitely the stable browser compared to other ones and it has been my…

4 years ago

Find windows OS version from command line

Windows has multiple command line utilities that can help find the version of the Windows…

4 years ago

How to check if Windows 32 or 64 bit?

There are multiple ways to check whether a Windows computer is running 32-bit OS or…

7 years ago