Share via


New-NetNat

New-NetNat

Creates a NAT object.

Sintassi

Parameter Set: cim:CreateInstance0
New-NetNat [-Name] <String> -ExternalIPInterfaceAddressPrefix <String> [-AsJob] [-CimSession <CimSession[]> ] [-InternalRoutingDomainId <String> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Descrizione dettagliata

The New-NetNat cmdlet creates a Network Address Translation (NAT) object that translates an internal network address to an external network address. NAT modifies IP address and port information in packet headers.

You can modify some settings by using the Set-NetNat cmdlet.

Parametri

-AsJob

Alias

nessuno

Obbligatorio?

false

Posizione?

named

Valore predefinito

nessuno

Accetta input da pipeline?

false

Accetta caratteri jolly?

false

-CimSession<CimSession[]>

Esegue il cmdlet in una sessione remota o in un computer remoto. Immettere un nome di computer o un oggetto di sessione, ad esempio l'output del cmdlet New-CimSession o Get-CimSession. Il valore predefinito è la sessione corrente nel computer locale.

Alias

Session

Obbligatorio?

false

Posizione?

named

Valore predefinito

nessuno

Accetta input da pipeline?

false

Accetta caratteri jolly?

false

-ExternalIPInterfaceAddressPrefix<String>

Specifies the address prefix of the external interface, which connects the NAT to the external network.

Alias

nessuno

Obbligatorio?

true

Posizione?

named

Valore predefinito

nessuno

Accetta input da pipeline?

false

Accetta caratteri jolly?

false

-InternalRoutingDomainId<String>

Specifies the GUID of the routing domain of the internal interface.

Alias

nessuno

Obbligatorio?

false

Posizione?

named

Valore predefinito

nessuno

Accetta input da pipeline?

false

Accetta caratteri jolly?

false

-Name<String>

Specifies a name for the NAT object.

Alias

nessuno

Obbligatorio?

true

Posizione?

1

Valore predefinito

nessuno

Accetta input da pipeline?

false

Accetta caratteri jolly?

false

-ThrottleLimit<Int32>

Specifica il numero massimo di operazioni simultanee che è possibile stabilire per eseguire il cmdlet. Se il parametro viene omesso o si specifica il valore 0, Windows PowerShell® calcola un valore limite ottimale per il cmdlet basato sul numero di cmdlet CIM in esecuzione nel computer. Questo valore limite si applica solo al cmdlet corrente, non alla sessione o al computer.

Alias

nessuno

Obbligatorio?

false

Posizione?

named

Valore predefinito

nessuno

Accetta input da pipeline?

false

Accetta caratteri jolly?

false

-Confirm

Richiede conferma prima di eseguire il cmdlet.

Obbligatorio?

false

Posizione?

named

Valore predefinito

False

Accetta input da pipeline?

false

Accetta caratteri jolly?

false

-WhatIf

Mostra gli effetti dell'esecuzione del cmdlet. Il cmdlet non viene eseguito.

Obbligatorio?

false

Posizione?

named

Valore predefinito

False

Accetta input da pipeline?

false

Accetta caratteri jolly?

false

<CommonParameters>

Questo cmdlet supporta i parametri comuni: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer e -OutVariable. Per altre informazioni, vedere   about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Input

Il tipo di input è il tipo degli oggetti che è possibile reindirizzare al cmdlet.

  • None

Output

Il tipo di output corrisponde al tipo di oggetti generati dal cmdlet.

  • Microsoft.Management.Infrastructure.CimInstance#ROOT/StandardCimv2/MSFT_NetNat

Esempi

Example 1: Create a NAT object for a routing domain

This command creates a NAT object named TSQATenant. The command specifies an IP interface address and internal routing domain for TSQATenant. This example uses the placeholder a.b.c.0/24 to represent a public Internet address prefix.

PS C:\> New-NetNat -Name "TSQATenant" -ExternalIPInterfaceAddress "a.b.c.0/24" -InternalRoutingDomainId "{bb47986c-f134-4a29-ad87-24010bf2c92f}"

Example 2: Create a NAT object for all the computers on a subnet

This command creates a NAT object named AllTenants for all the computers in the specified subnet. This example uses the placeholder a.b.c.0/24 to represent a public Internet address prefix.

PS C:\> New-NetNat -Name "AllTenants" -ExternalIPInterfaceAddress "a.b.c.0/24"

Argomenti correlati

Get-NetNat

Remove-NetNat

Set-NetNat