Set-SCVPNConnection

Sets the properties of a VPN connection.

Syntax

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

Required Parameters

-GRETunnel

Indicates that this cmdlet uses a GRE tunnel.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
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
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

-AuthenticationMethod

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

Type:VPNAuthenticationMethod
Parameter Sets:PSKOnly, MachineCertificates
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
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Certificate

Specifies a security certificate object.

Type:ClientCertificate
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
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
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Description

Specifies a description for the VPN connection.

Type:String
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
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-GREIPv4Address

Specifies a Generic Route Encapsulation (GRE) IPv4 address.

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

Specifies a GRE IPv6 address.

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

Specifies a GRE key.

Type:UInt32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPAddresses
Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPSecIdleDisconnectSeconds
Type:UInt32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPSecMainSALifeTimeKiloBytes
Type:UInt32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPSecMainSALifeTimeSeconds
Type:UInt32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPSecQuickSALifeTimeKiloBytes
Type:UInt32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPSecQuickSALifeTimeSeconds
Type:UInt32
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
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
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LocalTrafficSelectors
Type:TrafficSelector[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MaximumBandwidthInboundKbps

Specifies, in kbps, the maximum inbound bandwidth.

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

Specifies, in kbps, the maximum outbound bandwidth.

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

Specifies the name of a VMM object.

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

Specifies a VMNetwork object.

Type:VMNetwork
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
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
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
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
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PeerIPAddresses
Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemoteTrafficSelectors
Type:TrafficSelector[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemoveLocalTrafficSelectors
Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemoveMaximumBandwidthInbound
Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemoveMaximumBandwidthOutbound
Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemoveRemoteTrafficSelectors
Type:SwitchParameter
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
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
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Status
Type:GatewayConnectionStatus
Parameter Sets:Error, Enabled, Disabled
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TargetIPv4VPNAddress

Specifies a target VPN address in IPv4 format.

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

Specifies a target VPN address in IPv6 format.

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

Specifies a VMM server object.

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