Share via


Add-SCNATConnection

Adds a NAT connection.

Syntax

ByVMNetworkGateway (Default)

Add-SCNATConnection
    [-VMNetworkGateway] <VMNetworkGateway>
    [-VMMServer <ServerConnection>]
    [-Name <String>]
    [-Description <String>]
    [-MaximumBandwidthInboundKbps <UInt64>]
    [-MaximumBandwidthOutboundKbps <UInt64>]
    [-ExternalIPPool <StaticIPAddressPool>]
    [-ExternalIPAddress <String>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [-OnBehalfOfUser <String>]
    [-OnBehalfOfUserRole <UserRole>]
    [<CommonParameters>]

ByVMNetwork

Add-SCNATConnection
    [-VMNetwork] <VMNetwork>
    [-VMMServer <ServerConnection>]
    [-Name <String>]
    [-Description <String>]
    [-MaximumBandwidthInboundKbps <UInt64>]
    [-MaximumBandwidthOutboundKbps <UInt64>]
    [-ExternalIPPool <StaticIPAddressPool>]
    [-ExternalIPAddress <String>]
    [-PublicIPAddress <AllocatedIPAddress>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [-OnBehalfOfUser <String>]
    [-OnBehalfOfUserRole <UserRole>]
    [<CommonParameters>]

Description

The Add-SCNATConnection cmdlet adds a network address translation (NAT) connection.

Examples

Example1: Add NAT connection to a virtual machine network with external IP

PS C:\> $VmNetwork = Get-SCVMNetwork -Name "NAT_VmNetwork"
PS C:\> $IpPool = Get-SCStaticIPAddressPool -Name "Private_IPPool"
PS C:\> Add-SCNATConnection -Name "NatConnection" -VMNetwork $VmNetwork -ExternalIPPool $IpPool

The first command gets the virtual machine network by its name and stores it in the $VmNetwork variable.

The second command gets the IP Pool by its name from the logical network used for providing Private/Public VIPs and stores it in the $IpPool variable.

The third command adds the NAT connection with name NatConnection to the virtual machine network $VmNetwork with IP from $IpPool.

Parameters

-Description

Specifies a description for the NAT connection.

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

-ExternalIPAddress

Specifies an external IP address.

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

-ExternalIPPool

Specifies an external IP pool.

Parameter properties

Type:StaticIPAddressPool
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 a variable in which job progress is tracked and stored.

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

-MaximumBandwidthInboundKbps

Specifies the maximum inbound bandwidth in kbps.

Parameter properties

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

-MaximumBandwidthOutboundKbps

Specifies the maximum outbound bandwidth in kbps.

Parameter properties

Type:UInt64
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 network object.

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

-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

-PublicIPAddress

Specifies an allocated IP address object.

Parameter properties

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

Parameter sets

ByVMNetwork
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 Virtual Machine Manager (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 VMNetwork object.

Parameter properties

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

Parameter sets

ByVMNetwork
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMNetworkGateway

Specifies a virtual machine network gateway object.

To obtain a VMNetworkGateway object, use the Get-SCVMNetworkGateway cmdlet.

Parameter properties

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

Parameter sets

ByVMNetworkGateway
Position:0
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.