Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

New-SCDefaultGateway

Updated: November 1, 2013

Applies To: System Center 2012 R2 Virtual Machine Manager

New-SCDefaultGateway

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

Syntax

Parameter Set: Automatic
New-SCDefaultGateway -IPAddress <String> [-Automatic] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: ByMetric
New-SCDefaultGateway -IPAddress <String> -Metric <Int32> [-VMMServer <ServerConnection> ] [ <CommonParameters>]




Detailed Description

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.

Parameters

-Automatic

Indicates if 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

-IPAddress<String>

Specifies an IPv4 or IPv6 address.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Metric<Int32>

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

-VMMServer<ServerConnection>

Specifies a VMM server object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • DefaultGateway

Examples

1: Create a default gateway object with an automatically calculated metric.

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

2: Create a default gateway object and manually set its metric.

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
 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.