Set-NetNat

Set-NetNat

Modifies settings for NAT objects.

構文

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>]

詳細説明

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.

パラメーター

-AsJob

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CimSession<CimSession[]>

リモート セッションまたはリモート コンピューターでコマンドレットを実行します。New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など、コンピューター名またはセッション オブジェクトを入力します。既定値は、ローカル コンピューターで実行中の現在のセッションです。

エイリアス

Session

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-IcmpQueryTimeout<UInt32>

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-InputObject<CimInstance[]>

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

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

-Name<String[]>

Specifies an array of names of NAT objects.

エイリアス

なし

必須?

true

位置は?

1

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-PassThru

作業中の項目を表すオブジェクトを返します。既定では、このコマンドレットによる出力はありません。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-TcpFilteringBehavior<FilteringBehaviorType>

Specifies filtering behavior for TCP connections. このパラメーターに対して使用できる値:

-- EndpointIndepedentFiltering
-- AddressDependentFiltering

The default value is EndpointIndepedentFiltering.

エイリアス

なし

必須?

false

位置は?

named

既定値

EndpointIndepedentFiltering

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ThrottleLimit<Int32>

このコマンドレットを実行するために確立できる最大同時操作数を指定します。このパラメーターを省略するか、値として 0 を入力した場合、Windows PowerShell® では、コンピューターで実行している CIM コマンドレットの数に基づいて、コマンドレットに対する最適なスロットル制限を計算します。スロットル制限は現在のコマンドレットのみに適用され、セッションまたはコンピューターには適用されません。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-UdpFilteringBehavior<FilteringBehaviorType>

Specifies filtering behavior for UDP sessions. このパラメーターに対して使用できる値:

-- EndpointIndepedentFiltering
-- AddressDependentFiltering

The default value is EndpointIndepedentFiltering.

エイリアス

なし

必須?

false

位置は?

named

既定値

EndpointIndepedentFiltering

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-UdpIdleSessionTimeout<UInt32>

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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.

エイリアス

なし

必須?

false

位置は?

named

既定値

0

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Confirm

コマンドレットを実行する前に、ユーザーに確認を求めます。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-WhatIf

コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

  • None

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

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

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 

関連トピック

Get-NetNat

New-NetNat

Remove-NetNat