Add-SCNATConnection

Adds a NAT connection.

Syntax

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

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

Specifies an external IP address.

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

Specifies an external IP pool.

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

Specifies a variable in which job progress is tracked and stored.

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

Specifies the maximum inbound bandwidth in kbps.

Type:UInt64
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MaximumBandwidthOutboundKbps

Specifies the maximum outbound bandwidth in kbps.

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

Specifies the name of a network object.

Type:String
Required:False
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
-PublicIPAddress

Specifies an allocated IP address object.

Type:AllocatedIPAddress
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 Virtual Machine Manager (VMM) server object.

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

Specifies a VMNetwork object.

Type:VMNetwork
Required:True
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMNetworkGateway

Specifies a virtual machine network gateway object.

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

Type:VMNetworkGateway
Required:True
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False