We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Dim IsVPNConnected, sComputer, oWMIService, colItems, objItem IsVPNConnected = False sComputer = "." Set oWMIService = GetObject("winmgmts:\\" _ & sComputer & "\root\CIMV2") Set colItems = oWMIService.ExecQuery( _ "SELECT * FROM Win32_NetworkAdapterConfiguration", , 48) For Each objItem In colItems 'Please check description of your VPN Connection by running command "ipconfig /all" on command-line. If (InStr(objItem.Description, "AnyConnect")) Then IsVPNConnected = objItem.IPEnabled End If Next If (IsVPNConnected) Then IsVPNConnected = MsgBox("I am Connected to VPN.") Else IsVPNConnected = MsgBox("I am Not Connected to VPN.") End If
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.