Set-SCVPNConnection

Sets the properties of a VPN connection.

Syntax

Set-SCVPNConnection [-VPNConnection] <VPNConnection> [-AuthenticationMethod <VPNAuthenticationMethod>]
 [-AuthenticationTransformConstants <VPNAuthenticationTransformConstants>] [-Certificate <ClientCertificate>]
 [-CipherTransformConstants <VPNCipherTransformConstants>] [-DHGroup <VPNDHGroup>] [-Description <String>]
 [-EncryptionMethod <VPNEncryptionMethod>] [-IPSecIdleDisconnectSeconds <UInt32>]
 [-IPSecMainSALifeTimeKiloBytes <UInt32>] [-IPSecMainSALifeTimeSeconds <UInt32>]
 [-IPSecQuickSALifeTimeKiloBytes <UInt32>] [-IPSecQuickSALifeTimeSeconds <UInt32>]
 [-IntegrityCheckMethod <VPNIntegrityCheckMethod>] [-JobVariable <String>]
 [-LocalTrafficSelectors <TrafficSelector[]>] [-MaximumBandwidthInboundKbps <UInt64>]
 [-MaximumBandwidthOutboundKbps <UInt64>] [-Name <String>] [-OnBehalfOfUser <String>]
 [-OnBehalfOfUserRole <UserRole>] [-PFSGroup <VPNPFSGroup>] [-PROTipID <Guid>]
 [-RemoteTrafficSelectors <TrafficSelector[]>] [-RemoveLocalTrafficSelectors] [-RemoveMaximumBandwidthInbound]
 [-RemoveMaximumBandwidthOutbound] [-RemoveRemoteTrafficSelectors] [-RunAsynchronously]
 [-Secret <RunAsAccount>] [-Status <GatewayConnectionStatus>] [-TargetIPv4VPNAddress <String>]
 [-TargetIPv6VPNAddress <String>] [-VMMServer <ServerConnection>] [<CommonParameters>]
Set-SCVPNConnection [-VPNConnection] <VPNConnection> [-Description <String>] [-GREIPv4Address <String>]
 [-GREIPv6Address <String>] [-GREKey <UInt32>] [-GRETunnel] [-JobVariable <String>]
 [-MaximumBandwidthInboundKbps <UInt64>] [-MaximumBandwidthOutboundKbps <UInt64>] [-Name <String>]
 [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>]
 [-RemoveMaximumBandwidthInbound] [-RemoveMaximumBandwidthOutbound] [-RunAsynchronously]
 [-Status <GatewayConnectionStatus>] [-TargetIPv4VPNAddress <String>] [-TargetIPv6VPNAddress <String>]
 [-VMMServer <ServerConnection>] [<CommonParameters>]
Set-SCVPNConnection [-VPNConnection] <VPNConnection> [-Description <String>] [-IPAddresses <String[]>]
 [-JobVariable <String>] [-MaximumBandwidthInboundKbps <UInt64>] [-MaximumBandwidthOutboundKbps <UInt64>]
 [-Name <String>] [-NextHopNetwork <VMNetwork>] [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] [-PeerIPAddresses <String[]>] [-RemoveMaximumBandwidthInbound]
 [-RemoveMaximumBandwidthOutbound] [-RunAsynchronously] [-Status <GatewayConnectionStatus>]
 [-VMMServer <ServerConnection>] [<CommonParameters>]

Description

The Set-SCVPNConnection cmdlet updates the properties of a virtual private network (VPN) connection.

Examples

Example 1: Modify a VPN connection

PS C:\> $VmNetworkGateway = Get-SCVMNetworkGateway -Name "VMGateway01"
PS C:\> $VPNConnection = Get-SCVPNConnection -VMNetworkGateway $VmNetworkGateway -Name "VPN01"
PS C:\> $RunAsAccount = Get-SCRunAsAccount -ID "972567d5-96ad-472e-9790-831bae5fd69c" 
PS C:\> $VpnConnection = Set-SCVPNConnection -AuthenticationMethod "PSKOnly" -AuthenticationTransformConstants "SHA196" -CipherTransformConstants "AES256" -DHGroup "Group2" -EncryptionMethod "AES256" -IntegrityCheckMethod "SHA1" -PFSGroup "PFS2048" -Name "IPSec" -TargetIPv4VPNAddress "100.100.100.200" -VPNConnection $VPNConnection -Secret $RunAsAccount

The first command gets a network gateway named VMGateway01, and then stores it in the $VmNetworkGateway variable.

The second command gets a VPN connection on the gateway in $VmNetworkGateway, and then stores it in the $VPNConnection variable.

The third command gets a Run As account, and then stores it in the $RunAsAccount variable. This account is used to modify the VPN connection.

The final command modifies the VPN connection in $VPNConnection. It specifies new values for several parameters.

Parameters

-AuthenticationMethod

Specifies a virtual private network (VPN) authentication method. Valid values are: PSKOnly, MachineCertificates.

Type:VPNAuthenticationMethod
Parameter Sets:PSKOnly, MachineCertificates
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-AuthenticationTransformConstants

Specifies a virtual private network (VPN) transform constant. Valid values are:

- SHA256128

  • MD596
  • SHA196
  • GCMAES128
  • GCMAES192
  • GCMAES256

Type:VPNAuthenticationTransformConstants
Parameter Sets:SHA256128, MD596, SHA196, GCMAES128, GCMAES192, GCMAES256, SHA256, None
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Certificate

Specifies a security certificate object.

Type:ClientCertificate
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CipherTransformConstants

Specifies a virtual private network cipher transform constants. Valid values are:

- DES

  • DES3
  • AES128
  • AES192
  • AES256
  • GCMAES128
  • GCMAES192
  • GCMAES256

Type:VPNCipherTransformConstants
Parameter Sets:DES, DES3, AES128, AES192, AES256, GCMAES128, GCMAES192, GCMAES256, None
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DHGroup

Specifies a virtual private network (VPN) Diffie-Hellman (DH) group. Valid values are:

- None

  • Group1
  • Group2
  • Group14
  • ECP256
  • ECP384
  • Group24

Type:VPNDHGroup
Parameter Sets:None, Group1, Group2, Group14, ECP256, ECP384, Group24
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Description

Specifies a description for the VPN connection.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EncryptionMethod

Specifies a virtual private network (VPN) encryption method. Valid values are:

- DES

  • DES3
  • AES128
  • AES192
  • AES256

Type:VPNEncryptionMethod
Parameter Sets:DES, DES3, AES128, AES192, AES256, CBCDES, CBCDES3, AES128CBC, AES192CBC, AES256CBC, GCMAES128, GCMAES192, GCMAES256
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-GREIPv4Address

Specifies a Generic Route Encapsulation (GRE) IPv4 address.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-GREIPv6Address

Specifies a GRE IPv6 address.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-GREKey

Specifies a GRE key.

Type:UInt32
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-GRETunnel

Indicates that this cmdlet uses a GRE tunnel.

Type:SwitchParameter
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPAddresses
Type:String[]
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPSecIdleDisconnectSeconds
Type:UInt32
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPSecMainSALifeTimeKiloBytes
Type:UInt32
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPSecMainSALifeTimeSeconds
Type:UInt32
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPSecQuickSALifeTimeKiloBytes
Type:UInt32
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPSecQuickSALifeTimeSeconds
Type:UInt32
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IntegrityCheckMethod

Specifies a virtual private network (VPN) integrity check method. Valid values are:

- MD5

  • SHA1
  • SHA256
  • SHA384

Type:VPNIntegrityCheckMethod
Parameter Sets:MD5, SHA1, SHA256, SHA384, SHA196
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LocalTrafficSelectors
Type:TrafficSelector[]
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MaximumBandwidthInboundKbps

Specifies, in kbps, the maximum inbound bandwidth.

Type:UInt64
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MaximumBandwidthOutboundKbps

Specifies, in kbps, the maximum outbound bandwidth.

Type:UInt64
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the name of a VMM object.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-NextHopNetwork

Specifies a VMNetwork object.

Type:VMNetwork
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OnBehalfOfUser

Specifies a user name. This cmdlet operates on behalf of the user that this parameter specifies.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OnBehalfOfUserRole

Specifies a user role. To obtain a user role, use the Get-SCUserRole cmdlet. This cmdlet operates on behalf of the user role that this parameter specifies.

Type:UserRole
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PFSGroup

Specifies a virtual private network (VPN) Perfect Forward Secrecy (PFS) group. Valid values are:

- None

  • PFS1
  • PFS2
  • PFS2048
  • ECP256
  • ECP384
  • PFSMM
  • PFS24

Type:VPNPFSGroup
Parameter Sets:None, PFS1, PFS2, PFS2048, ECP256, ECP384, PFSMM, PFS24, PFS14
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PeerIPAddresses
Type:String[]
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemoteTrafficSelectors
Type:TrafficSelector[]
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemoveLocalTrafficSelectors
Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemoveMaximumBandwidthInbound
Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemoveMaximumBandwidthOutbound
Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemoveRemoteTrafficSelectors
Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Secret

Specifies a Run As account.

To obtain a Run As account, use the Get-SCRunAsAccount cmdlet.

Type:RunAsAccount
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Status
Type:GatewayConnectionStatus
Parameter Sets:Error, Enabled, Disabled
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TargetIPv4VPNAddress

Specifies a target VPN address in IPv4 format.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TargetIPv6VPNAddress

Specifies a target VPN address in IPv6 format.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-VPNConnection

Specifies a virtual private network (VPN) connection object.

To obtain a VPN connection object, use the Get-SCVPNConnection cmdlet.

Type:VPNConnection
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False