The Add-SCVPNConnection cmdlet adds a virtual private network (VPN) connection to a virtual machine network to establish a site-to-site tunnel from a Virtual Machine Manager (VMM) managed network gateway to another endpoint.
The first command gets a network gateway named VMGateway01, and then stores it in the $VmNetworkGateway variable.
The second command gets a Run As account, and then stores it in the $RunAsAccount variable.
This account is used to add the VPN connection.
The final command adds a VPN connection to the virtual machine network gateway in $VmNetworkGateway, and then stores it in the $VpnConnection variable.
The Add-SCVPNConnection cmdlet adds a virtual private network (VPN) connection to a virtual machine network to establish a site-to-site tunnel from a Virtual Machine Manager (VMM) managed network gateway to another endpoint.
Parameter properties
Type:
String[]
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
L3
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-IPSecIdleDisconnectSeconds
The Add-SCVPNConnection cmdlet adds a virtual private network (VPN) connection to a virtual machine network to establish a site-to-site tunnel from a Virtual Machine Manager (VMM) managed network gateway to another endpoint.
Parameter properties
Type:
UInt32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
IPSec
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-IPSecMainSALifeTimeKiloBytes
The Add-SCVPNConnection cmdlet adds a virtual private network (VPN) connection to a virtual machine network to establish a site-to-site tunnel from a Virtual Machine Manager (VMM) managed network gateway to another endpoint.
Parameter properties
Type:
UInt32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
IPSec
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-IPSecMainSALifeTimeSeconds
The Add-SCVPNConnection cmdlet adds a virtual private network (VPN) connection to a virtual machine network to establish a site-to-site tunnel from a Virtual Machine Manager (VMM) managed network gateway to another endpoint.
Parameter properties
Type:
UInt32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
IPSec
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-IPSecQuickSALifeTimeKiloBytes
The Add-SCVPNConnection cmdlet adds a virtual private network (VPN) connection to a virtual machine network to establish a site-to-site tunnel from a Virtual Machine Manager (VMM) managed network gateway to another endpoint.
Parameter properties
Type:
UInt32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
IPSec
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-IPSecQuickSALifeTimeSeconds
The Add-SCVPNConnection cmdlet adds a virtual private network (VPN) connection to a virtual machine network to establish a site-to-site tunnel from a Virtual Machine Manager (VMM) managed network gateway to another endpoint.
Parameter properties
Type:
UInt32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
IPSec
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-JobVariable
Specifies that job progress is tracked and stored in the variable named by this parameter.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-LocalTrafficSelectors
The Add-SCVPNConnection cmdlet adds a virtual private network (VPN) connection to a virtual machine network to establish a site-to-site tunnel from a Virtual Machine Manager (VMM) managed network gateway to another endpoint.
Parameter properties
Type:
TrafficSelector[]
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
IPSec
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-MaximumBandwidthInboundKbps
Specifies, in kbps, the maximum inbound bandwidth.
Parameter properties
Type:
UInt64
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-MaximumBandwidthOutboundKbps
Specifies, in kbps, the maximum outbound bandwidth.
Parameter properties
Type:
UInt64
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Name
Specifies the name of a VMM object.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-NextHopNetwork
Specifies a VMNetwork object.
Parameter properties
Type:
VMNetwork
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
L3
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-OnBehalfOfUser
Specifies a user name.
This cmdlet operates on behalf of the user that this parameter specifies.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
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.
Parameter properties
Type:
UserRole
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-PeerIPAddresses
The Add-SCVPNConnection cmdlet adds a virtual private network (VPN) connection to a virtual machine network to establish a site-to-site tunnel from a Virtual Machine Manager (VMM) managed network gateway to another endpoint.
Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action.
This parameter lets you audit PRO tips.
Parameter properties
Type:
Guid
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Protocol
Specifies a VPN protocol.
The acceptable values for this parameter are:
IKEv2
L2TP
PPTP
GRE
Parameter properties
Type:
VPNProtocol
Default value:
None
Accepted values:
IKEv2, L2TP, PPTP, GRE, L3, IPSec
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-RemoteTrafficSelectors
The Add-SCVPNConnection cmdlet adds a virtual private network (VPN) connection to a virtual machine network to establish a site-to-site tunnel from a Virtual Machine Manager (VMM) managed network gateway to another endpoint.
Parameter properties
Type:
TrafficSelector[]
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
IPSec
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Secret
Specifies a Run As account.
To obtain a Run As account, use the Get-SCRunAsAccount cmdlet.
Parameter properties
Type:
RunAsAccount
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
IPSec
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-TargetIPv4VPNAddress
Specifies a target VPN address in IPv4 format.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
IPSec
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
GRE
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-TargetIPv6VPNAddress
Specifies a target VPN address in IPv6 format.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
IPSec
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
GRE
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VMMServer
Specifies a VMM server object.
Parameter properties
Type:
ServerConnection
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VMNetworkGateway
Specifies a virtual machine network gateway object.
To obtain a VMNetworkGateway object, use the Get-SCVMNetworkGateway cmdlet.
Parameter properties
Type:
VMNetworkGateway
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
0
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.