Set-VpnS2SInterface

Updates parameters for an S2S Interface.

Syntax

Set-VpnS2SInterface
   [[-Destination] <String[]>]
   [-AdminStatus <Boolean>]
   [-PromoteAlternate <Boolean>]
   [-AuthenticationMethod <String>]
   [-EapMethod <String>]
   [-InternalIPv4 <Boolean>]
   [-Force]
   [-PostConnectionIPv4Subnet <String[]>]
   [-IPv4TriggerFilter <String[]>]
   [-IPv4TriggerFilterAction <Action>]
   [-PostConnectionIPv6Subnet <String[]>]
   [-IPv6TriggerFilter <String[]>]
   [-IPv6TriggerFilterAction <Action>]
   [-IPv4Subnet <String[]>]
   [-Name] <String>
   [-ResponderAuthenticationMethod <String>]
   [-PassThru]
   [-Persistent]
   [-AutoConnectEnabled <Boolean>]
   [-InitiateConfigPayload <Boolean>]
   [-RadiusAttributeClass <String>]
   [-EnableQoS <EnableQoS>]
   [-TxBandwidthKbps <UInt64>]
   [-RxBandwidthKbps <UInt64>]
   [-NetworkOutageTimeSeconds <UInt32>]
   [-NumberOfTries <UInt32>]
   [-RetryIntervalSeconds <UInt32>]
   [-SADataSizeForRenegotiationKilobytes <UInt32>]
   [-SALifeTimeSeconds <UInt32>]
   [-MMSALifeTimeSeconds <UInt32>]
   [-IPv6Subnet <String[]>]
   [-InternalIPv6 <Boolean>]
   [-IdleDisconnectSeconds <UInt32>]
   [-UserName <String>]
   [-Password <String>]
   [-Certificate <X509Certificate2>]
   [-SharedSecret <String>]
   [-SourceIpAddress <String>]
   [-LocalVpnTrafficSelector <CimInstance[]>]
   [-RemoteVpnTrafficSelector <CimInstance[]>]
   [-EncryptionType <String>]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-VpnS2SInterface
   [[-Destination] <String[]>]
   [-AdminStatus <Boolean>]
   [-InternalIPv4 <Boolean>]
   [-Force]
   [-IPv4Subnet <String[]>]
   [-Name] <String>
   [-PassThru]
   [-EnableQoS <EnableQoS>]
   [-TxBandwidthKbps <UInt64>]
   [-RxBandwidthKbps <UInt64>]
   [-IPv6Subnet <String[]>]
   [-InternalIPv6 <Boolean>]
   [-SourceIpAddress <String>]
   [[-GreKey] <UInt32>]
   [-GreTunnel]
   [-IPv4Address <String>]
   [-IPv6Address <String>]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-VpnS2SInterface
   [[-Destination] <String[]>]
   [-AdminStatus <Boolean>]
   [-PromoteAlternate <Boolean>]
   [-AuthenticationMethod <String>]
   [-EapMethod <String>]
   [-InternalIPv4 <Boolean>]
   [-Force]
   [-PostConnectionIPv4Subnet <String[]>]
   [-IPv4TriggerFilter <String[]>]
   [-IPv4TriggerFilterAction <Action>]
   [-PostConnectionIPv6Subnet <String[]>]
   [-IPv6TriggerFilter <String[]>]
   [-IPv6TriggerFilterAction <Action>]
   [-IPv4Subnet <String[]>]
   [-Name] <String>
   [-ResponderAuthenticationMethod <String>]
   [-PassThru]
   [-Persistent]
   [-AutoConnectEnabled <Boolean>]
   [-InitiateConfigPayload <Boolean>]
   [-RadiusAttributeClass <String>]
   [-EnableQoS <EnableQoS>]
   [-TxBandwidthKbps <UInt64>]
   [-RxBandwidthKbps <UInt64>]
   [-NetworkOutageTimeSeconds <UInt32>]
   [-NumberOfTries <UInt32>]
   [-RetryIntervalSeconds <UInt32>]
   [-SADataSizeForRenegotiationKilobytes <UInt32>]
   [-SALifeTimeSeconds <UInt32>]
   [-MMSALifeTimeSeconds <UInt32>]
   [-IPv6Subnet <String[]>]
   [-InternalIPv6 <Boolean>]
   [-IdleDisconnectSeconds <UInt32>]
   [-UserName <String>]
   [-Password <String>]
   [-Certificate <X509Certificate2>]
   [-SharedSecret <String>]
   [-EncryptionMethod <EncryptionMethod>]
   [-IntegrityCheckMethod <IntegrityCheckMethod>]
   [-CipherTransformConstants <CipherTransformConstants>]
   [-DHGroup <DHGroup>]
   [-AuthenticationTransformConstants <AuthenticationTransformConstants>]
   [-PfsGroup <PfsGroup>]
   [-CustomPolicy]
   [-SourceIpAddress <String>]
   [-LocalVpnTrafficSelector <CimInstance[]>]
   [-RemoteVpnTrafficSelector <CimInstance[]>]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-VpnS2SInterace cmdlet is used to update parameters for a site-to-site (S2S) interface. If the connection is already connected, the changes take effect after disconnection. You can use the CustomPolicy parameter to customize Internet Protocol security (IPSec) settings. If the AuthenticationMethod parameter is set to pre-shared key (PSK), then only one interface can be enabled per destination and the initiator and responder policies are governed by what is specified for each interface. If the AuthenticationMethod parameter is set to user name or computer certificates (machine certificates), then only the initiator policies are governed by what is specified for each interface and the responder policies are governed by what is specified on the server. For incoming connections:

  • If the authentication method is pre shared key, the interface whose destination IP matches the incoming IP is activated.
  • If the authentication method is username, the interface whose name matches the username is activated.
  • If the authentication method is certificates the interface whose name matches the certificate subject name is activated.

This cmdlet is used to modify parameters a S2S Interface. If the connection is already connected, the changes take effect after disconnection.

Examples

Example 1: Modify the destination address of an interface

PS C:\>Set-VpnS2SInterface -Name "Edge1" -Destination 131.107.0.4 -PassThru

This command modifies the destination address of interface named Edge1.

Example 2: Modify the initiator authentication method

PS C:\>Set-VpnS2SInterface -Name "Edge1" -AuthenticationMethod EAP -EapMethod EAP-MSCHAPv2 -PassThru

This command modifies the initiator authentication method.

Example 3: Modify the configuration of an existing S2S VPN interface

PS C:\>Set-VpnS2SInterface -Name "Edge1" -IPv4Subnet 172.23.90.0/24:50 -PassThru
RoutingDomain   Name                 Destination          AdminStatus  ConnectionState IPv4Subnet
-------------   ----                 -----------          -----------  --------------- ----------
Rd_001          Blue-Tunnel-2        {100.0.0.7}          True         Disconnected    {172.23.90.0/24:50}

This command modifies the configuration of an existing S2S VPN interface of a specific routing domain in a Multi-Tenant environment.

Required Parameters

-CustomPolicy

Specifies custom Internet Key Exchange (IKE) IPsec policies, must be a separate parameter set.

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

Indicates that this cmdlet uses the GRE tunnel capability for the Windows Server Gateway.

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

Specifies the name of the connection.

Type: String
Aliases: ElementName
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Optional Parameters

-AdminStatus

Specifies the admin status of the cmdlet.

Type: Boolean
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-AsJob

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.

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

Specifies the AuthenticationMethod to be used by the S2S connection.

Type: String
Parameter Sets: EAP, MachineCertificates, PSKOnly, MSCHAPv2,
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-AuthenticationTransformConstants

Specifies the authentication transform plumbed in IPsec policy.

Type: AuthenticationTransformConstants
Aliases: FirstTransformType, AuthenticationTransformConstant
Parameter Sets: MD596, SHA196, SHA256128, GCMAES128, GCMAES192, GCMAES256, None
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-AutoConnectEnabled

{{Fill AutoConnectEnabled Description}}

Type: Boolean
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Certificate

Specifies the subject name of the certificate to be used in default store. This parameter is applicable only if the AuthenticationMethod parameter is set to MachineCert.

Type: X509Certificate2
Aliases: Cert
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-CimSession

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

Type: CimSession[]
Aliases: Session
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-CipherTransformConstants

Specifies the cipher plumbed in IPsec policy.

Type: CipherTransformConstants
Aliases: OtherCipherAlgorithm, FirstCipherAlgorithm, CipherTransformConstant
Parameter Sets: DES, DES3, AES128, AES192, AES256, GCMAES128, GCMAES192, GCMAES256, None
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Aliases: cf
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-DHGroup

Specifies the Diffie-Hellman (DH) Group Plumbed in IPsec policy.

Type: DHGroup
Parameter Sets: None, Group1, Group2, Group14, ECP256, ECP384, Group24
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Destination

Specifies the destination end-point of the S2S connection.

Type: String[]
Aliases: RemoteTunnelEndpoint, RemoteTunnelHostname, RemoteAddress
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-EapMethod

Specifies EAP method if IkeLocalAuthenticationMethod is EAP.

Type: String
Parameter Sets: EAP-TLS, EAP-PEAP, EAP-MSCHAPv2,
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-EnableQoS

Indicates whether to enable Quality of Service (QoS) on an interface. The acceptable values for this parameter are:

  • Enabled
  • Disabled
Type: EnableQoS
Parameter Sets: Disabled, Enabled
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-EncryptionMethod

Specifies the encryption method plumbed in IKE policy.

Type: EncryptionMethod
Aliases: Encryption
Parameter Sets: DES, DES3, AES128, AES192, AES256
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-EncryptionType

Specifies the type of Encryption.

Type: String
Parameter Sets: NoEncryption, RequireEncryption, OptionalEncryption, MaximumEncryption, CustomEncryption
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Force

Forces the command to run without asking for user confirmation.

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

Specifies the individual traffic flows within a Generic Routing Encapsulation (GRE) tunnel.

Type: UInt32
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-IPv4Address

Specifies the IPv4 address.

Type: String
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-IPv4Subnet

Specifies the IPv4 subnet that is routed on this connection with metric.

Type: String[]
Aliases: IPv4TriggerSubnet
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-IPv4TriggerFilter

Specifies an array of IPv4 filters that trigger demand dial connections.

Type: String[]
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-IPv4TriggerFilterAction

Indicates whether a filter should trigger an S2S connection.

Type: Action
Parameter Sets: Allow, Deny
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-IPv6Address

Specifies the IPv6 address.

Type: String
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-IPv6Subnet

Specifies the IPv6 subnet that is routed on this connection with metric.

Type: String[]
Aliases: IPv6TriggerSubnet
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-IPv6TriggerFilter

Specifies an array of IPv6 filters that trigger demand dial connections.

Type: String[]
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-IPv6TriggerFilterAction

Indicates whether a filter should trigger an S2S connection.

Type: Action
Parameter Sets: Allow, Deny
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-IdleDisconnectSeconds

Specifies the time, in seconds, after which an idle connection is terminated. Unless the idle time-out is disabled, the entire connection is terminated if the connection is idle for the specified interval.

Type: UInt32
Aliases: IdleDurationSeconds, IdleDisconnectSec
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-InitiateConfigPayload

Indicates whether to initiate a config payload negotiation.

Type: Boolean
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-IntegrityCheckMethod

Specifies the integrity method plumbed in IPsec policy.

Type: IntegrityCheckMethod
Aliases: FirstIntegrityAlgorithm, OtherHashAlgorithm
Parameter Sets: MD5, SHA1, SHA256, SHA384
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-InternalIPv4

Specifies that the IPv4 address should be negotiated.

Type: Boolean
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-InternalIPv6

Specifies that the Ipv6 address should be negotiated.

Type: Boolean
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-LocalVpnTrafficSelector

Specifies the traffic selector object.

Type: CimInstance[]
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-MMSALifeTimeSeconds
Type: UInt32
Aliases: MMSaLifeTimeSec
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-NetworkOutageTimeSeconds

Specifies the maximum network outage time after which the connection is disconnected.

Type: UInt32
Aliases: NetworkOutageTimeSec
Parameter Sets: 3, 6, 9, 12, 15, 30, 60, 120, 240, 360, 720, 900
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-NumberOfTries

Specifies the number of tries the connection is retried. If you specify 0, the cmdlet will retry indefinitely.

Type: UInt32
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

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

Specifies the password of the username to be used for dialing the connection. This parameter is only applicable if AuthenticationMethod is set to EAP.

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

Indicates whether the connection state is persisted across the service restart or system reboots.

Type: SwitchParameter
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-PfsGroup

Specifies the perfect forward secrecy (PFS) Group plumbed in IPsec policy.

Type: PfsGroup
Aliases: PfsGroupId
Parameter Sets: None, PFS1, PFS2, PFS2048, ECP256, ECP384, PFSMM, PFS24
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-PostConnectionIPv4Subnet

Specifies the IPv4 subnet routes that are added to a S2S interface after the connection is established. The values specified are not used to initiate the S2S VPN connection.

Type: String[]
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-PostConnectionIPv6Subnet

Specifies the IPv6 subnet routes that are added to a S2S interface after the connection is established. The values specified are not used to initiate the S2S VPN connection.

Type: String[]
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-PromoteAlternate

Specifies an alternate IP address that when it successfully connects becomes the primary IP address, and the current primary IP address is moved to the alternate list.

Type: Boolean
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-RadiusAttributeClass

Specifies a RADIUS attribute.

Type: String
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-RemoteVpnTrafficSelector

Specifies the traffic selector object.

Type: CimInstance[]
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-ResponderAuthenticationMethod

Specifies the responder AuthenticationMethod to be used by the S2S connection.

Type: String
Parameter Sets: MachineCertificates, PSKOnly,
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-RetryIntervalSeconds

Specifies the number of seconds between retries.

Type: UInt32
Aliases: RetryIntervalSec
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-RxBandwidthKbps

Specifies the receive bandwidth limit, in kilobits per second (Kbps).

Type: UInt64
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-SADataSizeForRenegotiationKilobytes

Specifies the number of kilobytes that are allowed to transfer using a security association (SA), after which the SA will be renegotiated.

Type: UInt32
Aliases: SARenegotiationDataSizeKB, LifeTimeKiloBytes
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-SALifeTimeSeconds

Specifies the lifetime of a SA in seconds, after which the SA is no longer valid.

Type: UInt32
Aliases: SaLifeTimeSec, LifeTimeSeconds, QMSALifeTimeSeconds
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-SharedSecret

Specifies the text of the shared secret to be used in dialing the connection. This parameter is only applicable if AuthenticationMethod is set to PSK.

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

Specifies the source IPv4 or IPv6 addresses to use when dialing the connection.

Type: String
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-ThrottleLimit

Specifies the maximum number of concurrent connections that can be established to run this command. If you omit this parameter or enter a value of 0, the default value, 32, is used.

The throttle limit applies only to the current command, not to the session or to the computer.

Type: Int32
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-TxBandwidthKbps

Specifies a transmit bandwidth limit, in Kbps, for the interface.

Type: UInt64
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-UserName

Specifies the username to be used for dialing this connection. This parameter is only applicable if AuthenticationMethod is set to EAP.

Type: String
Aliases: User
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Aliases: wi
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Outputs

Microsoft.Management.Infrastructure.CimInstance#VpnS2SInterface