New-SCDefaultGateway
Creates a default gateway object that is used when creating or modifying static IP address pools.
Parameter Set: Automatic
New-SCDefaultGateway -IPAddress <String> [-Automatic] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: ByMetric
New-SCDefaultGateway -IPAddress <String> -Metric <Int32> [-VMMServer <ServerConnection> ] [ <CommonParameters>]
The New-SCDefaultGateway cmdlet creates a 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.
Indicates that the metric associated with a network gateway is automatically computed.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies an IPv4 or IPv6 address.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies a numerical metric associated with a network gateway.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies a VMM server object.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
The input type is the type of the objects that you can pipe to the cmdlet.
The output type is the type of the objects that the cmdlet emits.
- DefaultGateway
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.
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, sets its metric to 10, and then stores the object in the $Gateway variable.
PS C:\> $Gateway = New-SCDefaultGateway -IPAddress 10.0.1.1 -Metric 10