Share via


Set-NetNat

Set-NetNat

Modifies settings for NAT objects.

Sintassi

Parameter Set: Query (cdxml)
Set-NetNat [-Name] <String[]> [-AsJob] [-CimSession <CimSession[]> ] [-IcmpQueryTimeout <UInt32> ] [-PassThru] [-TcpEstablishedConnectionTimeout <UInt32> ] [-TcpFilteringBehavior <FilteringBehaviorType> ] [-TcpTransientConnectionTimeout <UInt32> ] [-ThrottleLimit <Int32> ] [-UdpFilteringBehavior <FilteringBehaviorType> ] [-UdpIdleSessionTimeout <UInt32> ] [-UdpInboundRefresh <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: InputObject (cdxml)
Set-NetNat -InputObject <CimInstance[]> [-AsJob] [-CimSession <CimSession[]> ] [-IcmpQueryTimeout <UInt32> ] [-PassThru] [-TcpEstablishedConnectionTimeout <UInt32> ] [-TcpFilteringBehavior <FilteringBehaviorType> ] [-TcpTransientConnectionTimeout <UInt32> ] [-ThrottleLimit <Int32> ] [-UdpFilteringBehavior <FilteringBehaviorType> ] [-UdpIdleSessionTimeout <UInt32> ] [-UdpInboundRefresh <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Descrizione dettagliata

The Set-NetNat cmdlet modifies settings for Network Address Translation (NAT) objects. NAT modifies IP address and port information in packet headers. Use this cmdlet to modify the following:

-- Time-out values for ICMP and UDP sessions and TCP connections.
-- Behavior of TCP and UDP filtering.
-- Whether packets from external networks refresh UDP sessions.

Specify NAT objects to modify by using the Name parameter or by using the Get-NetNat cmdlet. Use the New-NetNat cmdlet to create NAT objects.

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

-IcmpQueryTimeout<UInt32>

Specifies the length of the time-out period, in seconds, for an ICMP query session.

Alias

nessuno

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 or the New-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?

true

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

-TcpEstablishedConnectionTimeout<UInt32>

Specifies the length of the time-out period, in seconds, for established TCP connections. Use the TcpTransientConnectionTimeout parameter to modify the time-out period for transient TCP connections.

Alias

nessuno

Obbligatorio?

false

Posizione?

named

Valore predefinito

nessuno

Accetta input da pipeline?

false

Accetta caratteri jolly?

false

-TcpFilteringBehavior<FilteringBehaviorType>

Specifies filtering behavior for TCP connections. I valori accettabili per questo parametro sono:

-- EndpointIndepedentFiltering
-- AddressDependentFiltering

The default value is EndpointIndepedentFiltering.

Alias

nessuno

Obbligatorio?

false

Posizione?

named

Valore predefinito

EndpointIndepedentFiltering

Accetta input da pipeline?

false

Accetta caratteri jolly?

false

-TcpTransientConnectionTimeout<UInt32>

Specifies the length of the time-out period, in seconds, for transient TCP connections. Use the TcpEstablishedConnectionTimeout parameter to modify the time-out period for established TCP connections.

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

-UdpFilteringBehavior<FilteringBehaviorType>

Specifies filtering behavior for UDP sessions. I valori accettabili per questo parametro sono:

-- EndpointIndepedentFiltering
-- AddressDependentFiltering

The default value is EndpointIndepedentFiltering.

Alias

nessuno

Obbligatorio?

false

Posizione?

named

Valore predefinito

EndpointIndepedentFiltering

Accetta input da pipeline?

false

Accetta caratteri jolly?

false

-UdpIdleSessionTimeout<UInt32>

Specifies the length of the time-out period, in seconds, for a UDP session.

Alias

nessuno

Obbligatorio?

false

Posizione?

named

Valore predefinito

nessuno

Accetta input da pipeline?

false

Accetta caratteri jolly?

false

-UdpInboundRefresh<Boolean>

Indicates whether a packet from the external network refreshes an existing UDP session. If you specify a value of $True for this parameter, either an inbound packet or an outbound packet refreshes an existing UDP session. If you specify a value of $False, only an outbound packet refreshes a UDP session. The default value is $False.

Alias

nessuno

Obbligatorio?

false

Posizione?

named

Valore predefinito

0

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: Modify settings for a NAT object

This command modifies a NAT object named TSQATenant. The command specifies a value of $True for the UdpInboundRefresh parameter, and, therefore, NAT refreshes UDP sessions for both inbound and outbound packets. The command changes TCP filtering behavior to address dependent filtering.

PS C:\> Set-NetNat -Name "TSQATenant" -TcpFilteringBehavior AddressDependentFiltering -UdpInboundRefresh $True 

Argomenti correlati

Get-NetNat

New-NetNat

Remove-NetNat