New-SCDefaultGateway

Creates a default gateway object that is used when creating or modifying static IP address pools.

Description

The New-SCDefaultGateway cmdlet creates a System Center Virtual Machine Manager (VMM) default gateway object that is used when creating or modifying static IP address pools. The default metric is automatic; to change this setting, use the Metric parameter.

For more information about New-SCDefaultGateway, type "Get-Help New-SCDefaultGateway -online".

Parameters

IPAddress

Required? true
Accept Pipeline Input? false
Position? named
Specifies an IPv4 or IPv6 address.  

Automatic

Required? false
Accept Pipeline Input? false
Position? named
Indicates if the metric associated with a network gateway is automatically computed.

VMMServer

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM server object.

IPAddress

Required? true
Accept Pipeline Input? false
Position? named
Specifies an IPv4 or IPv6 address.  

Metric

Required? true
Accept Pipeline Input? false
Position? named
Specifies a numerical metric associated with a network gateway.

VMMServer

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM server object.

Examples

1: Create a default gateway object with an automatically calculated metric.
PS C:\> $Gateway = New-SCDefaultGateway -IPAddress 10.0.0.1 -Automatic 
This command creates a gateway object with an IP address of 10.0.0.1, automatically computes the metric for the gateway object, and then stores the object in the $Gateway variable.
2: Create a default gateway object and manually set its metric.
PS C:\> $Gateway = New-SCDefaultGateway -IPAddress 10.0.1.1 -Metric 10
This command creates a gateway object with an IP address of 10.0.0.1, sets its metric to 10, and then stores the object in the $Gateway variable.

See Also