≡ Menu

Check VPN connection status command line

Learn how to check VPN connection status on your Windows system from command prompt.  Netsh command is used to find connection status of different networks, including the VPN.

Run the below command to find the VPN status

c:\>netsh interface show interface

An example run on my Windows 7 computer when I am connected to VPN.

c:\>netsh interface show interface

Admin State    State          Type             Interface Name
-------------------------------------------------------------------------
Enabled        Disconnected   Dedicated        Wireless Network Connection
Enabled        Connected      Dedicated        Local Area Connection
Enabled        Connected      Dedicated        Cisco AnyConnect Secure Mobility
                                                  Client Connection

I use Cisco AnyConnect to VPN connect, and the netsh command shows that it’s connected currently!

Even if you use a different VPN client, you should have a corresponding network adapter added into your network connections list. Run the above command and figure out your VPN connection and know it’s connection status.

2 comments… add one
  • MazTerGee

    Thanks for the tip

  • Brian

    With this I can keep monitoring if VPN is connected/disconnected from cmd and then I can trigger a custom command when it goes to disconnected state.

Leave a Comment