Export (0) Print
Expand All
Expand Minimize

Set-VpnS2SInterface

Windows Server 2012 R2 and Windows 8.1

Updated: September 24, 2014

Applies To: Windows 8.1, Windows PowerShell 4.0, Windows Server 2012 R2

Set-VpnS2SInterface

Modifies parameters for a site-to-site (S2S) interface.

Syntax

Parameter Set: EncryptionType
Set-VpnS2SInterface [-Name] <String> [-AdminStatus <Boolean> ] [-AsJob] [-AuthenticationMethod <String> ] [-Certificate <X509Certificate2> ] [-CimSession <CimSession[]> ] [-Destination <String[]> ] [-EapMethod <String> ] [-EnableQoS <EnableQoS> ] [-EncryptionType <String> ] [-Force] [-IdleDisconnectSeconds <UInt32> ] [-InitiateConfigPayload <Boolean> ] [-InternalIPv4 <Boolean> ] [-InternalIPv6 <Boolean> ] [-IPv4Subnet <String[]> ] [-IPv4TriggerFilter <String[]> ] [-IPv4TriggerFilterAction <Action> ] [-IPv6Subnet <String[]> ] [-IPv6TriggerFilter <String[]> ] [-IPv6TriggerFilterAction <Action> ] [-NetworkOutageTimeSeconds <UInt32> ] [-NumberOfTries <UInt32> ] [-PassThru] [-Password <String> ] [-Persistent] [-PostConnectionIPv4Subnet <String[]> ] [-PostConnectionIPv6Subnet <String[]> ] [-PromoteAlternate <Boolean> ] [-RadiusAttributeClass <String> ] [-ResponderAuthenticationMethod <String> ] [-RetryIntervalSeconds <UInt32> ] [-RxBandwidthKbps <UInt64> ] [-SADataSizeForRenegotiationKilobytes <UInt32> ] [-SALifeTimeSeconds <UInt32> ] [-SharedSecret <String> ] [-SourceIpAddress <String> ] [-ThrottleLimit <Int32> ] [-TxBandwidthKbps <UInt64> ] [-UserName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

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




Detailed Description

The Set-VpnS2SInterface cmdlet modifies parameters for a site-to-site (S2S) interface. If the connection already exists, then the changes take effect after disconnection.

Use the CustomPolicy parameter to customize IPsec settings. If the protocol is Automatic, then the only authentication method allowed is user name. 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 AuthenticationMethod parameter is set to PSK, then the interface for which the destination IP address matches the incoming IP address is activated.
-- If the AuthenticationMethod parameter is set to user name, then the interface for which the name matches the user name is activated.
-- If the AuthenticationMethod parameter is certificates, then the interface for which the name matches the certificate subject name is activated.

Parameters

-AdminStatus<Boolean>

Specifies the administrator status of the cmdlet.


Aliases

none

Required?

false

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. The cmdlet immediately returns an object that represents the job and then displays the command prompt. You can continue to work in the session while the job completes. To manage the job, use the *-Job cmdlets. To get the job results, use the Receive-Job cmdlet. For more information about Windows PowerShell® background jobs, see about_Jobs.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-AuthenticationMethod<String>

Specifies the authentication method to be used by the S2S connection.


Aliases

none

Required?

false

Position?

named

Default Value

EAP

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-AuthenticationTransformConstants<AuthenticationTransformConstants>

Specifies a transform constant. The acceptable values for this parameter are: 

-- SHA256128
-- MD596
-- SHA196
-- GCMAES128
-- GCMAES192
-- GCMAES256


Aliases

FirstTransformType,AuthenticationTransformConstant

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Certificate<X509Certificate2>

Specifies the subject name of the certificate to use in the default store. Applicable only if the AuthenticationMethod parameter is set to MachineCert.


Aliases

Cert

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CimSession<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.


Aliases

Session

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CipherTransformConstants<CipherTransformConstants>

Specifies a cipher transform constant. The acceptable values for this parameter are: 

-- DES
-- DES3
-- AES128
-- AES192
-- AES256
-- GCMAES128
-- GCMAES192
-- GCMAES256


Aliases

OtherCipherAlgorithm,FirstCipherAlgorithm,CipherTransformConstant

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-CustomPolicy

Specifies the custom IKE IPsec policies, must be a separate parameter set.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DHGroup<DHGroup>

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


Aliases

none

Required?

false

Position?

named

Default Value

2

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Destination<String[]>

Specifies the destination end point of the S2S connection.
Note: If the Certificate parameter is specified as PSK, then an IP address should be specified for this parameter as a fully qualified domain name (FQDN) will not work.


Aliases

RemoteTunnelEndpoint,RemoteTunnelHostname,RemoteAddress

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-EapMethod<String>

Specifies the EAP method if IkeLocalAuthenticationMethod is EAP.


Aliases

none

Required?

false

Position?

named

Default Value

MSCHAPv2

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-EnableQoS<EnableQoS>

Indicates whether to enable Quality of Service (QoS) on an interface.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-EncryptionMethod<EncryptionMethod>

Specifies the encryption method in the IKE policy.


Aliases

Encryption

Required?

false

Position?

named

Default Value

4

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-EncryptionType<String>

Specifies the type of encryption.


Aliases

none

Required?

false

Position?

named

Default Value

RequireEncryption

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Force

Forces the command to run without asking for user confirmation.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-IdleDisconnectSeconds<UInt32>

Specifies the time interval, in seconds, after which an idle connection is disconnected. Unless you disable idle timeout, an idle connection is disconnected after this time interval is reached.


Aliases

IdleDurationSeconds,IdleDisconnectSec

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-InitiateConfigPayload<Boolean>

Indicates whether to initiate Config payload negotiation.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-IPv4Subnet<String[]>

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


Aliases

IPv4TriggerSubnet

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-IPv4TriggerFilter<String[]>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-IPv4TriggerFilterAction<Action>

Indicates whether a filter should trigger an S2S connection.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-IPv6Subnet<String[]>

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


Aliases

IPv6TriggerSubnet

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-IPv6TriggerFilter<String[]>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-IPv6TriggerFilterAction<Action>

Indicates whether a filter should trigger an S2S connection.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-IntegrityCheckMethod<IntegrityCheckMethod>

Specifies the integrity method in the IPsec policy.


Aliases

FirstIntegrityAlgorithm,OtherHashAlgorithm

Required?

false

Position?

named

Default Value

2

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-InternalIPv4<Boolean>

Specifies that the IPv4 address should be negotiated.


Aliases

none

Required?

false

Position?

named

Default Value

True

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-InternalIPv6<Boolean>

Specifies that the IPv6 address should be negotiated.


Aliases

none

Required?

false

Position?

named

Default Value

True

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of the connection.


Aliases

ElementName

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-NetworkOutageTimeSeconds<UInt32>

Specifies the maximum amount of time, in seconds, before a connection is disconnected due to a network outage.


Aliases

NetworkOutageTimeSec

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-NumberOfTries<UInt32>

Specifies the number of connection attempts.
If this parameter is specified as zero (0), then the connection is not retried if the first attempt fails.


Aliases

none

Required?

false

Position?

named

Default Value

3

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Password<String>

Specifies the password for the user name to be used for the connection.
Applicable only if the AuthenticationMethod parameter is set to EAP.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Persistent

Indicates that a connection is not disconnected due to inactivity.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-PfsGroup<PfsGroup>

Specifies the PFS group in the IPsec policy.


Aliases

PfsGroupId

Required?

false

Position?

named

Default Value

3

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-PostConnectionIPv4Subnet<String[]>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-PostConnectionIPv6Subnet<String[]>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-PromoteAlternate<Boolean>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-RadiusAttributeClass<String>

Specifies a RADIUS attribute.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ResponderAuthenticationMethod<String>

Specifies the authentication method to be used by the S2S initiator to validate the S2S responder.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-RetryIntervalSeconds<UInt32>

Specifies the time interval, in seconds, to wait between retries.


Aliases

RetryIntervalSec

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-RxBandwidthKbps<UInt64>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SADataSizeForRenegotiationKilobytes<UInt32>

Specifies the amount of data, in kilobytes (KB), that can be transferred using a security association (SA). When the limit is reached, the SA must be renegotiated.


Aliases

SARenegotiationDataSizeKB,LifeTimeKiloBytes

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SALifeTimeSeconds<UInt32>

Specifies the lifetime, in seconds, of a security association (SA). The SA is no longer valid after this time interval.


Aliases

SaLifeTimeSec,LifeTimeSeconds

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SharedSecret<String>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SourceIpAddress<String>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ThrottleLimit<Int32>

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-TxBandwidthKbps<UInt64>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-UserName<String>

Specifies the user name to be used for the connection. Applicable only if the AuthenticationMethod parameter is set to EAP.


Aliases

User

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

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


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.Management.Infrastructure.CimInstance#VpnS2SInterface

    The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object.


Examples

EXAMPLE 1

This example modifies the destination address for the interface named edge1.


PS C:\> Set-VpnS2SInterface –Name edge1 -Destination 131.107.0.4 -PassThru
Name                 Destination          AdminStatus  ConnectionState IPv4Subnet 
----                 -----------          -----------  --------------- ---------- 
edge1                {131.107.0.4}        True         Disconnected    {10.0.0.0/24:100} 

EXAMPLE 2

This example modifies the initiator authentication method.


PS C:\> Set-VpnS2SInterface –Name edge1 -AuthenticationMethod EAP -EapMethod EAP-MSCHAPv2 -PassThru
Name                 Destination          AdminStatus  ConnectionState IPv4Subnet 
----                 -----------          -----------  --------------- ---------- 
EDGE1                {131.107.0.4}        True         Disconnected    {10.0.0.0/24:100} 

EXAMPLE 3

This example modifies the responder authentication method for edge1.


PS C:\> Get-VpnS2SInterface -Name edge1 | Set-VpnS2SInterface -ResponderAuthenticationMethod MachineCertificates -PassThru
Name                 Destination          AdminStatus  ConnectionState IPv4Subnet 
----                 -----------          -----------  --------------- ---------- 
EDGE1                {131.107.0.4}        True         Disconnected    {10.0.0.0/24:100} 

EXAMPLE 4

This example changes the authentication method for the interface 3-edge1 to computer certificate and specifies the certificate for which the subject name matches edge1.contoso.com.


 

PS C:\> $cert1 = ( Get-ChildItem -Path cert:LocalMachine\My | Where-Object -FilterScript { $_.Subject -Like "*CN=edge1.contoso.com" } )

 

PS C:\> Set-VpnS2SInterface –Name 3-edge1 -AuthenticationMethod MachineCertificates -Certificate $cert1 -ResponderAuthenticationMethod MachineCertificates -PassThru
Name                 Destination          AdminStatus  ConnectionState IPv4Subnet 
----                 -----------          -----------  --------------- ---------- 
3-edge1              {131.107.0.30}       True         Disconnected    {10.6.0.0/24:2} 

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft