Add-SCVMNetworkGateway

Adds a virtual machine network gateway to VMM.

Syntax

Default (Default)

Add-SCVMNetworkGateway
    -VMNetwork <VMNetwork>
    -Name <String>
    [-VMMServer <ServerConnection>]
    [-RequiresVPN]
    [-RequiresNAT]
    [-EnableBGP <Boolean>]
    [-AutonomousSystemNumber <UInt32>]
    [-Description <String>]
    [-RoutingIPSubnet <String>]
    [-FabricRole <FabricRole>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [-OnBehalfOfUser <String>]
    [-OnBehalfOfUserRole <UserRole>]
    [<CommonParameters>]

ByGateway

Add-SCVMNetworkGateway
    -VMNetwork <VMNetwork>
    -NetworkGateway <NetworkServiceBase>
    -Name <String>
    [-VMMServer <ServerConnection>]
    [-EnableBGP <Boolean>]
    [-AutonomousSystemNumber <UInt32>]
    [-Description <String>]
    [-RoutingIPSubnet <String>]
    [-FabricRole <FabricRole>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [-OnBehalfOfUser <String>]
    [-OnBehalfOfUserRole <UserRole>]
    [<CommonParameters>]

Description

The Add-SCVMNetworkGateway cmdlet adds a virtual machine network gateway to Virtual Machine Manager (VMM).

Examples

Example 1: Create a virtual machine network gateway

PS C:\> $ContosoNetworkGateway = Get-SCNetworkGateway -Name "ContosoNetworkGateway"
PS C:\> $VmNetworkGateway = Add-SCVMNetworkGateway -Name "VMNetworkGateway" -EnableBGP $True -NetworkGateway $ContosoNetworkGateway -VMNetwork $VmNetwork -AutonomousSystemNumber "1000" -RoutingIPSubnet "10.251.251.0/29"

The first command gets a network gateway named ContosoNetworkGateway, and then stores it in the $ContosoNetworkGateway variable.

The second command creates a virtual machine network gateway for the gateway in $ContosoNetworkGateway.

Example 2: Create a virtual machine network gateway (IPv6)

PS C:\> $ContosoNetworkGateway = Get-SCNetworkGateway -Name "ContosoNetworkGateway"
PS C:\> $VmNetworkGateway = Add-SCVMNetworkGateway -Name "VMNetworkGateway" -EnableBGP $True -NetworkGateway $ContosoNetworkGateway -VMNetwork $VmNetwork -AutonomousSystemNumber "1000" -RoutingIPSubnet "10.251.251.0;FD4A:293D:184F:382C::/64"

The first command gets a network gateway named ContosoNetworkGateway, and then stores it in the $ContosoNetworkGateway variable.

The second command creates a virtual machine network gateway for the gateway in $ContosoNetworkGateway.

Parameters

-AutonomousSystemNumber

Specifies an Autonomous System Number (ASN).

Parameter properties

Type:UInt32
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

-Description

Specifies a description for the virtual machine network gateway.

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

-EnableBGP

Indicates whether Border Gateway Protocol (BGP) is enabled.

Parameter properties

Type:Boolean
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

-FabricRole

Specifies a fabric role.

Parameter properties

Type:FabricRole
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

-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

-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:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-NetworkGateway

Specifies a network gateway object.

To obtain a network gateway object, use the Get-SCNetworkGateway cmdlet.

Parameter properties

Type:NetworkServiceBase
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByGateway
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

-PROTipID

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

-RequiresNAT

Indicates that the connection requires network address translation (NAT).

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Default
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RequiresVPN

Indicates that a virtual private network (VPN) is required.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Default
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RoutingIPSubnet

Specifies a routing IP subnet for a virtual machine network gateway.

Note

IPV4 and IPV6 address separated by ‘;’ can be passed to 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

-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

-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

-VMNetwork

Specifies a virtual machine network object.

To get a virtual machine network object, use the Get-SCVMNetwork cmdlet.

Parameter properties

Type:VMNetwork
Default value:None
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

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.