Add-SCNATConnection

Adds a NAT connection.

Syntax

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

Required Parameters

-VMNetwork

Specifies a VMNetwork object.

Type:VMNetwork
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
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-Description

Specifies a description for the NAT connection.

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

Specifies an external IP address.

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

Specifies an external IP pool.

Type:StaticIPAddressPool
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
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MaximumBandwidthInboundKbps

Specifies the maximum inbound bandwidth in kbps.

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

Specifies the maximum outbound bandwidth in kbps.

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

Specifies the name of a network object.

Type:String
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
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
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
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PublicIPAddress

Specifies an allocated IP address object.

Type:AllocatedIPAddress
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
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMMServer

Specifies a Virtual Machine Manager (VMM) server object.

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