Share via


Remove-NetNat

Remove-NetNat

Removes NAT objects.

Sintassi

Parameter Set: Query (cdxml)
Remove-NetNat [[-Name] <String[]> ] [-AsJob] [-CimSession <CimSession[]> ] [-PassThru] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: InputObject (cdxml)
Remove-NetNat -InputObject <CimInstance[]> [-AsJob] [-CimSession <CimSession[]> ] [-PassThru] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Descrizione dettagliata

The Remove-NetNat cmdlet removes Network Address Translation (NAT) objects. NAT modifies IP address and port information in packet headers. When you remove a NAT object, NAT no longer does that translation. NAT drops any existing connections created through that NAT object.

Specify a value for the Name parameter to remove specific NAT objects. To remove all the NAT objects from a computer, do not include the Name parameter. You can use the Get-NetNat cmdlet to specify NAT objects to delete.

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

-InputObject<CimInstance[]>

Specifies an array of NAT objects. To obtain a NAT object, use the Get-NetNat cmdlet.

Alias

nessuno

Obbligatorio?

true

Posizione?

named

Valore predefinito

nessuno

Accetta input da pipeline?

True (ByValue)

Accetta caratteri jolly?

false

-Name<String[]>

Specifies an array of names of NAT objects.

Alias

nessuno

Obbligatorio?

false

Posizione?

1

Valore predefinito

nessuno

Accetta input da pipeline?

True (ByPropertyName)

Accetta caratteri jolly?

false

-PassThru

Restituisce un oggetto che rappresenta l'elemento in uso. Per impostazione predefinita, il cmdlet non genera alcun output.

Alias

nessuno

Obbligatorio?

false

Posizione?

named

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: Remove all NAT objects on a computer

This command removes all the NAT objects on the current computer.

PS C:\> Remove-NetNat

Argomenti correlati

Get-NetNat

New-NetNat

Set-NetNat