Adding VPN Connections to Windows 10/11 with Powershell

~ 0 min
2022-11-05 17:57

Enter the following command as an administrator (for all users) within Powershell, and omit the -AllUser portion for a user-based VPN connection:

SSTP, MsChapV2 - All Users (run as administrator):

Add-VpnConnection -Name "Corporate VPN" -ServerAddress "corpvpn.mycorp.com" -TunnelType SSTP -AuthenticationMethod MsChapv2 -RememberCredential -SplitTunneling -AllUser

SSTP, MsChapV2 - User Only:

Add-VpnConnection -Name "Corporate VPN" -ServerAddress "corpvpn.mycorp.com" -TunnelType SSTP -AuthenticationMethod MsChapv2 -RememberCredential -SplitTunneling 

SSTP, PAP - All Users (for Duo):

Add-VpnConnection -Name "Corporate VPN" -ServerAddress "corpvpn.mycorp.com" -TunnelType SSTP -AuthenticationMethod MsChapv2 -RememberCredential -SplitTunneling -AllUser

To remove a VPN connection:

Remove-VpnConnection -Name "Corporate VPN"
Tags: powershell
Average rating 0 (0 Votes)

You cannot comment on this entry