0

I want to kill the RDP app, VPN Client app and all its existing tunnels using powershell. The commands below works to kill the apps:

Stop-Process -name mstsc -F
Stop-Process -name SWGVC -F

However, the current tunnel still stays so I can keep pinging any laptop using our office network although VPN is closed.

When I searched how to close the existing VPN tunnels via PowerShell, I see I can find the VPN connections using get-vpnconnection and then do Disconnect-VpnUser but get-vpnconnection returns no data at all. When I go to "Network and Internet" from Settings and check if there is any VPN added, none.

How can I be sure the existing SSL tunnels are closed when the VPN app is killed using powershell? Any help would be appreciated.

Regards

Eray Balkanli
  • 7,752
  • 11
  • 48
  • 82

1 Answers1

0

Try this command to check the VPN adapters connections

[System.Net.NetworkInformation.NetworkInterface]::GetAllNetworkInterfaces() | select Name,Description,Operationalstatus

Paul
  • 1
  • 2
  • Thanks Paul, it seems like Ethernet 3 runs the VPN but how can I proceed then to take it down? – Eray Balkanli Sep 22 '22 at 13:29
  • Hi Eray, Could you try this command to disable the the VPN adapter and check, Get-NetAdapter "Ethernet 3" | Disable-NetAdapter -Confirm:$false -PassThru If you want re-enable it try the below command, Get-NetAdapter "Ethernet 3" | Enable-NetAdapter -Confirm:$false -PassThru – Paul Sep 23 '22 at 17:22