New-VpnTrafficSelector

Creates a VPN Traffic selector object that configures the IKE traffic selector.

Syntax

New-VpnTrafficSelector
   [[-IPAddressRange] <String[]>]
   [[-PortRange] <UInt32[]>]
   [-ProtocolId <UInt32>]
   [-Type <Type>]
   [-TsPayloadId <UInt16>]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [<CommonParameters>]

Description

The New-VpnTrafficSelector cmdlet creates a virtual private network (VPN) traffic selector object that is used to configure the Internet Key Exchange (IKEv2) VPN traffic selectors.

Examples

Example 1: Create two IKEv2 VPN traffic selectors and configure them for an S2S VPN interface

PS C:\>$LocalTS  = New-VpnTrafficSelector -IPAddressRange 10.10.0.0, 10.10.255.255 -PortRange 100, 1000 -Protocol 6 -Type IPv4
PS C:\> $RemoteTS = New-VpnTrafficSelector -IPAddressRange 20.20.0.0, 20.20.255.255 -PortRange 100, 1000 -Protocol 6 -Type IPv4
PS C:\> Set-VpnS2SInterface -Name EDGE1 -LocalVpnTrafficSelector $LocalTS -RemoteVpnTrafficSelector $RemoteTS

This command creates two IKEv2 VPN traffic selectors and then configures them for a S2S VPN Interface.

Optional Parameters

-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
-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
-IPAddressRange

Specifies a sting array that contains the address range allowed in the traffic selector.

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

Specifies the port range allowed in the traffic selector.

Type:UInt32[]
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ProtocolId

Specifies the protocol ID allowed for the traffic selector.

Type:UInt32
Position:Named
Default value:None
Accept pipeline input:False
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
-TsPayloadId

{{Fill TsPayloadId Description}}

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

Specifies an enumeration to specify address family (IPv4 or IPv6) in the address range. Acceptable values for this enumeration are:

  • IPv2
  • IPv6
Type:Type
Parameter Sets:IPv4, IPv6
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.Management.Infrastructure.CimInstance#VpnTrafficSelecor