Add-SCVMNetworkGateway

Adds a virtual machine network gateway to VMM.

Syntax

Add-SCVMNetworkGateway [-AutonomousSystemNumber <UInt32>] [-Description <String>] [-EnableBGP <Boolean>]
 [-FabricRole <FabricRole>] [-JobVariable <String>] -Name <String> -NetworkGateway <NetworkServiceBase>
 [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] [-RoutingIPSubnet <String>]
 [-RunAsynchronously] [-VMMServer <ServerConnection>] -VMNetwork <VMNetwork> [<CommonParameters>]
Add-SCVMNetworkGateway [-AutonomousSystemNumber <UInt32>] [-Description <String>] [-EnableBGP <Boolean>]
 [-FabricRole <FabricRole>] [-JobVariable <String>] -Name <String> [-OnBehalfOfUser <String>]
 [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] [-RequiresNAT] [-RequiresVPN] [-RoutingIPSubnet <String>]
 [-RunAsynchronously] [-VMMServer <ServerConnection>] -VMNetwork <VMNetwork> [<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.

Parameters

-AutonomousSystemNumber

Specifies an Autonomous System Number (ASN).

Type:UInt32
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Description

Specifies a description for the virtual machine network gateway.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EnableBGP

Indicates whether Border Gateway Protocol (BGP) is enabled.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-FabricRole

Specifies a fabric role.

Type:FabricRole
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the name of a VMM object.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-NetworkGateway

Specifies a network gateway object.

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

Type:NetworkServiceBase
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OnBehalfOfUser

Specifies a user name. This cmdlet operates on behalf of the user that this parameter specifies.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters: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.

Type:UserRole
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters: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.

Type:Guid
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RequiresNAT

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

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RequiresVPN

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

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RoutingIPSubnet

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

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-VMNetwork

Specifies a virtual machine network object.

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

Type:VMNetwork
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False