Set-SCNATConnection

Updates a NAT connection.

Syntax

Set-SCNATConnection [-NATConnection] <NATConnection> [-Description <String>] [-JobVariable <String>]
 [-MaximumBandwidthInboundKbps <UInt64>] [-MaximumBandwidthOutboundKbps <UInt64>] [-Name <String>]
 [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] [-RunAsynchronously]
 [-Status <GatewayConnectionStatus>] [-VMMServer <ServerConnection>] [<CommonParameters>]

Description

The Set-SCNATConnection cmdlet updates a network address translation (NAT) connection.

Examples

Example 1: Change the name and description for NAT connection of a virtual machine network

PS C:\> $VmNetwork = Get-SCVMNetwork -Name "NAT_VMNetwork"
PS C:\> $NatConnection = Get-SCNATConnection -VMNetwork $VmNetwork
PS C:\> Set-SCNATConnection -NATConnection $NatConnection -Name "NatConn_VMNAT1" -Description "NAT Connection for VM Network1"

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

The second command gets NAT connection for the virtual machine network and stores it in the $NatConnection variable.

The third command changes the NAT connection name to NatConn_VMNAT1 and its description to NAT Connection for VM Network1.

Example 2: Change the status for NAT connection of a virtual machine network

PS C:\> $VmNetwork = Get-SCVMNetwork -Name "NAT_VMNetwork"
PS C:\> $NatConnection = Get-SCNATConnection -VMNetwork $VmNetwork
PS C:\> Set-SCNATConnection -NATConnection  $NatConnection -Status Disabled"

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

The second command gets NAT connection for the virtual machine network and stores it in the $NatConnection variable.

The third command changes the NAT connection status to Disabled.

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
-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, in kbps, the maximum inbound bandwidth.

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

Specifies, in kbps, the maximum outbound bandwidth.

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

Specifies a NAT connection object.

Type:NATConnection
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
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
-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
-Status

Specifies a gateway connection status. The acceptable values for this parameter are:

- Error

  • Enabled
  • Disabled

Type:GatewayConnectionStatus
Parameter Sets:Error, Enabled, Disabled
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