PowerShell Logo Small

Remove-VpnConnection



This is the built-in help made by Microsoft for the command 'Remove-VpnConnection', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Removes specified VPN connection profiles.

SYNTAX


Remove-VpnConnection [-Name] <String[]> [-AllUserConnection] [-AsJob] [-CimSession <CimSession[]>] [-Force] [-PassThru] [-ThrottleLimit <Int32>] [-Confirm] [-WhatIf]
[<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Remove-VpnConnection cmdlet removes one or more specified VPN connection profiles. If errors occur when you remove the VPN profile, or if the specified VPN profile does
not exist, the error information is returned.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=290783
Add-VpnConnection
Get-VpnConnection
Set-VpnConnection
New-EapConfiguration

REMARKS

<

Examples


Example 1: Removing a single VPN connection

PS C:\> Remove-VpnConnection -Name "Test1" -Force -PassThru
Name : Test1
ServerAddress : 10.1.1.2
AllUserConnection : False
Guid : {65EA2A6D-60A5-49DA-AEDF-5542171D3794}
TunnelType : Automatic
AuthenticationMethod : {MsChapv2}
EncryptionLevel : Required
L2tpIPsecAuth : Certificate
UseWinlogonCredential : False
EapConfigXmlStream :
ConnectionStatus : Disconnected
NapState : NotConnected
RememberCredential : False
SplitTunneling : False
DnsSuffix :
IdleDisconnectSeconds : 0



This command removes the VPN connection named Test1. The Force parameter suppresses warnings and non-terminating errors.

By specifying the Passthru parameter, you can see the configuration of the VPN connection object.




Example 2: Removing multiple VPN connections

PS C:\>Remove-VpnConnection -Name "Test3", "Test4", "Test5" -AllUserConnection -Force -PassThru
Name : Test3
ServerAddress : 10.1.1.1
AllUserConnection : True
Guid : {E37453AF-EE0B-4DD8-9AC0-30B262B0CA74}
TunnelType : L2tp
AuthenticationMethod : {Pap}
EncryptionLevel : Optional
L2tpIPsecAuth : Certificate
UseWinlogonCredential : False
EapConfigXmlStream :
ConnectionStatus : Disconnected
NapState : NotConnected
RememberCredential : False
SplitTunneling : False
DnsSuffix : washington.contoso.com
IdleDisconnectSeconds : 600

Name : Test4
ServerAddress : 10.1.1.1
AllUserConnection : True
Guid : {C5D5579E-FF9D-4F31-ABE1-B26AB38107CD}
TunnelType : L2tp
AuthenticationMethod : {Eap}
EncryptionLevel : Required
L2tpIPsecAuth : Psk
UseWinlogonCredential : False
EapConfigXmlStream : #document
ConnectionStatus : Disconnected
NapState : NotConnected
RememberCredential : True
SplitTunneling : True
DnsSuffix :
IdleDisconnectSeconds : 0

Name : Test5
ServerAddress : 10.1.1.1
AllUserConnection : True
Guid : {CF59A4C3-57DB-41FA-9793-D0C785756ABD}
TunnelType : L2tp
AuthenticationMethod : {Eap}
EncryptionLevel : Required
L2tpIPsecAuth : Certificate

UseWinlogonCredential : False
EapConfigXmlStream : #document
ConnectionStatus : Disconnected
NapState : NotConnected
RememberCredential : True
SplitTunneling : True
DnsSuffix :
IdleDisconnectSeconds : 0



This command removes the VPN connections named Test3, Test4 and Test5. By specifying the AllUserConnection parameter, the connections are removed from the global phone book.
The Force parameter suppresses warnings and non-terminating errors.

By specifying the Passthru parameter, you can see the configuration of all of the VPN connection objects.