Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

Add-VpnS2SInterface

Add-VpnS2SInterface

Create a S2S interface with the specified parameters.

Syntax

Parameter Set: CustomPolicy
Add-VpnS2SInterface [-Name] <String> [-Destination] <String[]> [[-RoutingDomain] <String> ] -CustomPolicy [-AdminStatus <Boolean> ] [-AuthenticationMethod <String> {EAP | MachineCertificates | PSKOnly | } ] [-AuthenticationTransformConstants <AuthenticationTransformConstants> {MD596 | SHA196 | SHA256128 | GCMAES128 | GCMAES192 | GCMAES256 | None} ] [-Certificate <X509Certificate2> ] [-CimSession <CimSession[]> ] [-CipherTransformConstants <CipherTransformConstants> {DES | DES3 | AES128 | AES192 | AES256 | GCMAES128 | GCMAES192 | GCMAES256 | None} ] [-DHGroup <DHGroup> {None | Group1 | Group2 | Group14 | ECP256 | ECP384 | Group24} ] [-EapMethod <String> {EAP-TLS | EAP-PEAP | EAP-MSCHAPv2 | } ] [-EnableQoS <EnableQoS> ] [-EncryptionMethod <EncryptionMethod> {DES | DES3 | AES128 | AES192 | AES256} ] [-IdleDisconnectSeconds <UInt32> ] [-InformationAction <ActionPreference> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <String> ] [-InitiateConfigPayload <Boolean> ] [-IntegrityCheckMethod <IntegrityCheckMethod> {MD5 | SHA1 | SHA256 | SHA384} ] [-InternalIPv4 <Boolean> ] [-InternalIPv6 <Boolean> ] [-IPv4Subnet <String[]> ] [-IPv4TriggerFilter <String[]> ] [-IPv4TriggerFilterAction <Action> ] [-IPv6Subnet <String[]> ] [-IPv6TriggerFilter <String[]> ] [-IPv6TriggerFilterAction <Action> ] [-LocalVpnTrafficSelector <CimInstance[]> ] [-MMSALifeTimeSeconds <UInt32> ] [-NetworkOutageTimeSeconds <UInt32> {3 | 6 | 9 | 12 | 15 | 30 | 60 | 120 | 240 | 360 | 720 | 900} ] [-NumberOfTries <UInt32> ] [-PassThru] [-Password <String> ] [-Persistent] [-PfsGroup <PfsGroup> {None | PFS1 | PFS2 | PFS2048 | ECP256 | ECP384 | PFSMM | PFS24} ] [-PostConnectionIPv4Subnet <String[]> ] [-PostConnectionIPv6Subnet <String[]> ] [-PromoteAlternate <Boolean> ] [-Protocol <String> {L2TP | IKEv2 | Automatic} ] [-RadiusAttributeClass <String> ] [-RemoteVpnTrafficSelector <CimInstance[]> ] [-ResponderAuthenticationMethod <String> {MachineCertificates | PSKOnly | } ] [-RetryIntervalSeconds <UInt32> ] [-RxBandwidthKbps <UInt64> ] [-SADataSizeForRenegotiationKilobytes <UInt32> ] [-SALifeTimeSeconds <UInt32> ] [-SharedSecret <String> ] [-SourceIpAddress <String> ] [-ThrottleLimit <Int32> ] [-TxBandwidthKbps <UInt64> ] [-UserName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>] [ <WorkflowParameters>]

Parameter Set: EncryptionType
Add-VpnS2SInterface [-Name] <String> [-Destination] <String[]> [[-RoutingDomain] <String> ] [-AdminStatus <Boolean> ] [-AuthenticationMethod <String> {EAP | MachineCertificates | PSKOnly | } ] [-Certificate <X509Certificate2> ] [-CimSession <CimSession[]> ] [-EapMethod <String> {EAP-TLS | EAP-PEAP | EAP-MSCHAPv2 | } ] [-EnableQoS <EnableQoS> ] [-EncryptionType <String> {NoEncryption | RequireEncryption | OptionalEncryption | MaximumEncryption} ] [-IdleDisconnectSeconds <UInt32> ] [-InformationAction <ActionPreference> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <String> ] [-InitiateConfigPayload <Boolean> ] [-InternalIPv4 <Boolean> ] [-InternalIPv6 <Boolean> ] [-IPv4Subnet <String[]> ] [-IPv4TriggerFilter <String[]> ] [-IPv4TriggerFilterAction <Action> ] [-IPv6Subnet <String[]> ] [-IPv6TriggerFilter <String[]> ] [-IPv6TriggerFilterAction <Action> ] [-LocalVpnTrafficSelector <CimInstance[]> ] [-MMSALifeTimeSeconds <UInt32> ] [-NetworkOutageTimeSeconds <UInt32> {3 | 6 | 9 | 12 | 15 | 30 | 60 | 120 | 240 | 360 | 720 | 900} ] [-NumberOfTries <UInt32> ] [-PassThru] [-Password <String> ] [-Persistent] [-PostConnectionIPv4Subnet <String[]> ] [-PostConnectionIPv6Subnet <String[]> ] [-PromoteAlternate <Boolean> ] [-Protocol <String> {L2TP | IKEv2 | Automatic} ] [-RadiusAttributeClass <String> ] [-RemoteVpnTrafficSelector <CimInstance[]> ] [-ResponderAuthenticationMethod <String> {MachineCertificates | PSKOnly | } ] [-RetryIntervalSeconds <UInt32> ] [-RxBandwidthKbps <UInt64> ] [-SADataSizeForRenegotiationKilobytes <UInt32> ] [-SALifeTimeSeconds <UInt32> ] [-SharedSecret <String> ] [-SourceIpAddress <String> ] [-ThrottleLimit <Int32> ] [-TxBandwidthKbps <UInt64> ] [-UserName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>] [ <WorkflowParameters>]

Parameter Set: GreInterface
Add-VpnS2SInterface [-Name] <String> [-Destination] <String[]> [[-RoutingDomain] <String> ] [[-GreKey] <UInt32> ] -GreTunnel -SourceIpAddress <String> [-AdminStatus <Boolean> ] [-CimSession <CimSession[]> ] [-EnableQoS <EnableQoS> ] [-InformationAction <ActionPreference> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <String> ] [-InternalIPv4 <Boolean> ] [-InternalIPv6 <Boolean> ] [-IPv4Address <String> ] [-IPv4Subnet <String[]> ] [-IPv6Address <String> ] [-IPv6Subnet <String[]> ] [-PassThru] [-RxBandwidthKbps <UInt64> ] [-ThrottleLimit <Int32> ] [-TxBandwidthKbps <UInt64> ] [-Confirm] [-WhatIf] [ <CommonParameters>] [ <WorkflowParameters>]




Detailed Description

The Add-VpnS2SInterface cmdlet creates a site-to-site (S2S) interface with the specified parameters to customize Internet Protocol security (IPsec) settings. If the Protocol parameter is set to AutomaticOnly the only authentication method allowed is username. If the authentication method is a pre-shared key, only one interface can be enabled per destination and the initiator and responder policies are governed by what is specified per interface. If the authentication method is username or machine certificates, only initiator policies are governed by what is specified per interface, responder policies are governed by what is specified on the server.
For incoming connections:

-- If the authentication method is a 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.

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

-AuthenticationMethod<String>

Specifies the AuthenticationMethod to be used by the S2S connection.
If a pre-shared key is specified as authentication method, there can only be one active site to site virtual private network (VPN) interface per destination IP address.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-AuthenticationTransformConstants<AuthenticationTransformConstants>

Specifies the authentication transform plumbed in IPsec policy.


Aliases

FirstTransformType,AuthenticationTransformConstant

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-Certificate<X509Certificate2>

Specifies the certificate to be used in default store. Applicable only if AuthenticationMethod 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 the cipher plumbed in IPsec policy.


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


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Destination<String[]>

Specifies the destination end-point of the S2S connection.


Aliases

RemoteTunnelEndpoint,RemoteTunnelHostname,RemoteAddress

Required?

true

Position?

3

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-DHGroup<DHGroup>

Specifies the Diffie-Hellman (DH) Group to use during IKE key exchanges. Acceptable values for this parameter are:

-- None
-- Group1
-- Group2
-- Group14
-- ECP256
-- ECP384
-- Group24


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-EapMethod<String>

Specifies EAP method if IkeLocalAuthenticationMethod is EAP.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-EnableQoS<EnableQoS>

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

-- Enabled
-- Disabled


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

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-EncryptionType<String>

Specifies the type of encryption. The acceptable values for this parameter are:

-- NoEncryption
-- RequireEncryption
-- OptionalEncryption
-- MaximumEncryption


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-GreKey<UInt32>

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


Aliases

none

Required?

false

Position?

5

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-GreTunnel

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


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-IdleDisconnectSeconds<UInt32>

Specifies a value that 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.


Aliases

IdleDurationSeconds,IdleDisconnectSec

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-InformationAction<ActionPreference>

Specifies how this cmdlet responds to an information event. The acceptable values for this parameter are:

-- SilentlyContinue
-- Stop
-- Continue
-- Inquire
-- Ignore
-- Suspend


Aliases

infa

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-InformationVariable<String>

Specifies a variable in which to store an information event message.


Aliases

iv

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-InitiateConfigPayload<Boolean>

Indicates whether to initiate configuration payload negotiation.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-IntegrityCheckMethod<IntegrityCheckMethod>

Specifies the integrity method plumbed in IPsec policy.


Aliases

OtherHashAlgorithm,FirstIntegrityAlgorithm

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-InternalIPv4<Boolean>

Specifies Negotiation of IPv4 Address.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-InternalIPv6<Boolean>

Specifies negotiation of IPv6 Address.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-IPv4Address<String>

Indicates whether the cmdlet sets custom IKE IPsec policies.


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


Aliases

IPv4TriggerSubnet

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-IPv4TriggerFilter<String[]>

Specifies a string 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

-IPv6Address<String>

Indicates whether the cmdlet sets custom IKE IPsec policies.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-IPv6Subnet<String[]>

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


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

-LocalVpnTrafficSelector<CimInstance[]>

Specifies the initiator Traffic Selector object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-MMSALifeTimeSeconds<UInt32>

Specifies the lifetime of main mode security association in seconds, after which the main mode security association is no longer valid.


Aliases

MMSaLifeTimeSec

Required?

false

Position?

named

Default Value

none

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 network outage time after which the connection is disconnected. Acceptable values for this parameter are:

-- 6
-- 9
-- 12
-- 15
-- 30
-- 60
-- 120
-- 240
-- 360
-- 720
-- 900


Aliases

NetworkOutageTimeSec

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-NumberOfTries<UInt32>

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


Aliases

none

Required?

false

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Password<String>

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


Aliases

none

Required?

false

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-PfsGroup<PfsGroup>

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


Aliases

PfsGroupId

Required?

false

Position?

named

Default Value

none

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 that an alternate IP address that connects successfully 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

-Protocol<String>

Specifies the underlying protocol.


Aliases

KeyModule

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

-RemoteVpnTrafficSelector<CimInstance[]>

Specifies the responder traffic selector object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-ResponderAuthenticationMethod<String>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-RetryIntervalSeconds<UInt32>

Number of seconds between retries.


Aliases

RetryIntervalSec

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-RoutingDomain<String>

Specifies an ID, as a string, for a routing domain. The ID of a routing domain is a user-defined alphanumeric string.


Aliases

RoutingDomainName

Required?

false

Position?

4

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 number of kilobytes that are allowed to transfer using a security association (SA). After that the SA will be renegotiated


Aliases

SaRenegotiationDataSizeKB,LifeTimeKiloBytes

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-SALifeTimeSeconds<UInt32>

Lifetime of an SA in seconds, after which the SA is no longer valid


Aliases

SaLifeTimeSec,LifeTimeSeconds,QMSALifeTimeSeconds

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 in dialing the connection. This is only applicable if AuthenticationMethod 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?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-ThrottleLimit<Int32>

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.


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 username to be used for dialing this connection. This is only applicable 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: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see    about_CommonParameters.

<WorkflowParameters>

This cmdlet supports the following workflow common parameters: -PSParameterCollection, -PSComputerName, -PSCredential, -PSConnectionRetryCount, -PSConnectionRetryIntervalSec, -PSRunningTimeoutSec, -PSElapsedTimeoutSec, -PSPersist, -PSAuthentication, -PSAuthenticationLevel, -PSApplicationName, -PSPort, -PSUseSSL, -PSConfigurationName, -PSConnectionURI, -PSAllowRedirection, -PSSessionOption, -PSCertificateThumbprint, -PSPrivateMetadata, -AsJob, -JobName, and –InputObject. For more information, see    about_WorkflowCommonParameters.

Inputs

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

Outputs

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

  • Microsoft.Management.Infrastructure.CimInstance#VpnS2SInterface

Examples

Example 1: Create a S2S VPN interface

This command creates a site-to-site VPN interface by name EDGE1 to destination 131.107.0.20. The protocol is IKEv2 and the authentication method is pre-shared key named ABC. Traffic to 10.2.0.0/24 and subnet 2001:db8:2::/48 is sent over this interface if there is no other interface on the server that has same routes with metric less than 100 . In case the interface is in disconnected state the connection is triggered if there is no other interface on the server that has same routes with metric less than 100.


PS C:\> Add-VpnS2SInterface -Name "EDGE1" 131.107.0.20 -Protocol IKEv2 -AuthenticationMethod PSKOnly -SharedSecret "ABC" -IPv4Subnet 10.2.0.0/24:100 -IPv6Subnet 2001:db8:2::/48:100

Example 2: Create an interface that uses EAP authentication

This command creates an interface that uses EAP authentication method and multiple subnets are routed on this interface 131.0.1.0/24, 121.0.0.0/16.


PS C:\> Add-VpnS2SInterface -IPv4Subnet @("131.0.1.0/24:254", "121.0.0.0/16:124") -UserName "abc@contoso.com" -Destination "30.0.0.1" -IPv6Subnet @("3ffe::/32:24", "2ffe::/32:24") -AuthenticationMethod "EAP" -Name "TestVpnS2SInterface" -RetryInterval 120 -EncryptionType "RequireEncryption" -InternalIPv4 1 -InternalIPv6 1 -NumberofTries 20 -AdminStatus $True -IdleDisconnectSeconds 300 -PromoteAlternate $True -Password "1111_aaaa" -PassThru

Example 3: Add an IKEv2 S2S VPN interface

This command adds an IKEv2 S2S VPN (Demand-Dial) interface to the Multi-Tenant Gateway for Routing Domain Rd_001


PS C:\> Add-VpnS2SInterface -RoutingDomain Rd_001 -Name "Blue-Tunnel-2" -Protocol IKEv2 -Destination 100.0.0.7 -AuthenticationMethod PSKOnly -SharedSecret 111_aaa -Persistent -IPv4Subnet 172.23.90.4/32:100 -PassThru

Example 4: Add a Gre Tunnel interface

This command adds a Gre Tunnel interface to the Multi-Tenant Gateway for Routing Domain named Rd_001.


PS C:\> Add-VpnS2SInterface –GreTunnel –GreKey “1234” -RoutingDomain Rd_001 -Name "Blue-Tunnel-3" -Destination 100.0.0.8 -Persistent -IPv4Subnet 172.23.90.4/32:100 -PassThru

Example 5: Add an IKEv2 S2S VPN interface with Traffic Selectors

This command adds an IKEv2 S2S VPN (Demand-Dial) interface to the Multi-Tenant Gateway for Routing Domain Rd_001.


PS C:\> Add-VpnS2SInterface -RoutingDomain Rd_001 -Name "Blue-Tunnel-2" -Protocol IKEv2 -Destination 100.0.0.7 -AuthenticationMethod PSKOnly -SharedSecret 111_aaa -Persistent -IPv4Subnet 172.23.90.4/32:100 –LocalVpnTrafficSelector $localTSObject –RemoteVpnTrafficSelector $RemoteTSObject –PassThru | fl *

Related topics

Community Additions

ADD
Show:
© 2016 Microsoft