Set-VpnIPAddressAssignment

Set-VpnIPAddressAssignment

Configures the IPv4 address assignment method or the IPv6 prefix for IPv6 address assignment.

構文

Parameter Set: VpnIPAddressAssignment
Set-VpnIPAddressAssignment [-AsJob] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-IPAddressRange <String[]> ] [-IPAssignmentMethod <String> ] [-IPv6Prefix <String> ] [-PassThru] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: VpnIPv6PrefixEntrypoint
Set-VpnIPAddressAssignment -EntrypointName <String> -IPv6Prefix <String> [-AsJob] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-PassThru] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

詳細説明

The Set-VpnIPAddressAssignment cmdlet is only used to toggle from one IPv4 address assignment type to another. This cmdlet cannot be used to add additional IPv4 address ranges if a static pool IP address assignment is being used.
-- This cmdlet cannot be used to Enable or Disable an IPv4 or IPv6 address assignment.

パラメーター

-AsJob

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

false

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

false

-CimSession<CimSession[]>

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

エイリアス

Session

必須?

false

位置は?

named

既定値

なし

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

false

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

false

-ComputerName<String>

Specifies the IPv4 or IPv6 address, or host name, of the computer on which the VPN server computer specific tasks should be run. If this parameter is specified, then the address assignment properties are configured for that VPN server.

エイリアス

Cn

必須?

false

位置は?

named

既定値

なし

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

false

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

false

-EntrypointName<String>

Specifies a site in a multi-site deployment for which the IPv6 prefix needs to be configured. This parameter is not applicable to the IPv4 address assignment properties as these properties are always configured at the individual server level and not site level.
If this parameter is not specified in a multi-site deployment, then this parameter value to which the cmdlet is run is used. The server could also be represented by using the ComputerName parameter.
If this parameter and the ComputerName parameter are specified and the ComputerName does not belong to the site represented by this parameter, then this parameter takes precedence and the authentication type is configured for it.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

false

-IPAddressRange<String[]>

Specifies the IP address range from which IP addresses are allocated to VPN clients. Consists of a starting IP and an ending IP. This parameter can be configured only if the IPAssignmentMethod parameter is specified to be StaticPool.
If there are no pre-existing IPv4 address pools, then it is mandatory to specify an address range.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

false

-IPAssignmentMethod<String>

Specifies the mechanism for IPv4 address assignment. このパラメーターに対して使用できる値:
-- Dhcp.
-- StaticPool.
When load balancing is active the IPv4 address assignment method cannot be configured to DHCP. Only a static pool is supported.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

false

-IPv6Prefix<String>

Specifies the IPv6 prefix used for IPv6 address assignment.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

false

-PassThru

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

false

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

false

-ThrottleLimit<Int32>

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

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#VpnIPAddressAssignment

    Microsoft.Management.Infrastructure.CimInstance オブジェクトは、Windows Management Instrumentation (WMI) オブジェクトを表示するラッパー クラスです。シャープ記号 (#) の後のパスは、基になる WMI オブジェクトの名前空間とクラス名です。
    The object consists of the following properties:
    -- The IPv4 assignment method configured: DHCP or static pool.
    -- If static pool assignment is configured for IPv4, then the list of configured address pools. Each pool consists of a starting IP address and an ending IP address.
    -- The IPv6 prefix configured.

EXAMPLE 1

This cmdlet sets the IPv4 address assignment type to be DHCP which causes IPv4 address assignment to happen from a DHCP server.

PS C:\> Set-VpnIPAddressAssignment -IPAssignmentMethod "Dhcp" -PassThru

EXAMPLE 2

The cmdlet specifies the IPv4 address assignment to happen from the IP range 30.1.1.10 through 30.1.1.30. IPv6 prefix 2002:836b:2:1000::/64 is used for IPv6 address assignment. Changing the IPv6 prefix requires the remote access service to be restarted in order to take effect. This is conveyed through the warning message.

PS C:\> Set-VpnIPAddressAssignment -IPAssignmentMethod "StaticPool" -IPAddressRange "30.1.1.10", "30.1.1.30" -IPv6Prefix "2002:836b:2:1000::/64" -PassThru

関連トピック

Add-VpnIPAddressRange

Remove-VpnIPAddressRange