Set-DnsServerClientSubnet
Set-DnsServerClientSubnet
Updates the IP addresses in a client subnet.
構文
Parameter Set: Set3
Set-DnsServerClientSubnet [-Name] <String> [-Action] <String> {ADD | REMOVE | REPLACE} [[-IPv4Subnet] <String[]> ] [[-IPv6Subnet] <String[]> ] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-InformationAction <System.Management.Automation.ActionPreference> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <System.String> ] [-PassThru] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>] [ <WorkflowParameters>]
詳細説明
The Set-DnsServerClientSubnet cmdlet updates the IP addresses in a client subnet on a Domain Name System (DNS) server. You can add, remove, or replace addresses. You can modify the IPv4 addresses, IPv6 addresses, or both kinds of addresses.
パラメーター
-Action<String>
Specifies whether to add to, remove, or replace the IP addresses in the client subnet. このパラメーターに指定できる値は、次のとおりです。
-- ADD
-- REMOVE
-- REPLACE
Aliases |
none |
必須/オプション |
true |
位置 |
3 |
既定値 |
none |
パイプライン入力の受け入れ |
false |
ワイルドカード文字の受け入れ |
false |
-CimSession<CimSession[]>
リモート セッションまたはリモート コンピューターでコマンドレットを実行します。コンピューター名またはセッション オブジェクト (New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など) を入力します。既定値は、ローカル コンピューター上の現在のセッションです。
Aliases |
Session |
必須/オプション |
false |
位置 |
named |
既定値 |
none |
パイプライン入力の受け入れ |
false |
ワイルドカード文字の受け入れ |
false |
-ComputerName<String>
Specifies a remote DNS server. You can specify an IP address or any value that resolves to an IP address, such as a fully qualified domain name (FQDN), host name, or NETBIOS name.
Aliases |
Cn |
必須/オプション |
false |
位置 |
named |
既定値 |
none |
パイプライン入力の受け入れ |
false |
ワイルドカード文字の受け入れ |
false |
-InformationAction<System.Management.Automation.ActionPreference>
Aliases |
infa |
必須/オプション |
false |
位置 |
named |
既定値 |
none |
パイプライン入力の受け入れ |
false |
ワイルドカード文字の受け入れ |
false |
-InformationVariable<System.String>
Aliases |
iv |
必須/オプション |
false |
位置 |
named |
既定値 |
none |
パイプライン入力の受け入れ |
false |
ワイルドカード文字の受け入れ |
false |
-IPv4Subnet<String[]>
Specifies an array IPv4 subnet addresses in Classless Interdomain Routing (CIDR) notation.
Aliases |
none |
必須/オプション |
false |
位置 |
4 |
既定値 |
none |
パイプライン入力の受け入れ |
true(ByPropertyName) |
ワイルドカード文字の受け入れ |
false |
-IPv6Subnet<String[]>
Specifies an array IPv6 subnet addresses in CIDR notation.
Aliases |
none |
必須/オプション |
false |
位置 |
5 |
既定値 |
none |
パイプライン入力の受け入れ |
true(ByPropertyName) |
ワイルドカード文字の受け入れ |
false |
-Name<String>
Specifies the name of the client subnet to modify.
Aliases |
none |
必須/オプション |
true |
位置 |
2 |
既定値 |
none |
パイプライン入力の受け入れ |
true(ByPropertyName) |
ワイルドカード文字の受け入れ |
false |
-PassThru
作業中の項目を表すオブジェクトを返します。既定では、このコマンドレットから出力は生成されません。
Aliases |
none |
必須/オプション |
false |
位置 |
named |
既定値 |
none |
パイプライン入力の受け入れ |
false |
ワイルドカード文字の受け入れ |
false |
-ThrottleLimit<Int32>
コマンドレットを実行する際に確立できる同時実行操作の最大数を指定します。このパラメーターを省略するか、値 0
を入力した場合、コンピューター上で実行されている CIM コマンドレットの数に基づいて、コマンドレットに最適なスロットル制限が Windows PowerShell® によって計算されます。スロットル制限は、セッションやコンピューターではなく、現在のコマンドレットにのみ適用されます。
Aliases |
none |
必須/オプション |
false |
位置 |
named |
既定値 |
none |
パイプライン入力の受け入れ |
false |
ワイルドカード文字の受け入れ |
false |
-Confirm
コマンドレットを実行する前に確認メッセージを表示します。
必須/オプション |
false |
位置 |
named |
既定値 |
false |
パイプライン入力の受け入れ |
false |
ワイルドカード文字の受け入れ |
false |
-WhatIf
コマンドレットが実行された場合に何が起きるのかを示します。コマンドレットは実行されません。
必須/オプション |
false |
位置 |
named |
既定値 |
false |
パイプライン入力の受け入れ |
false |
ワイルドカード文字の受け入れ |
false |
<CommonParameters>
このコマンドレットは共通のパラメーターをサポートしています(-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、および -OutVariable)。詳細については、TechNet の「 「about_CommonParameters」 (https://go.microsoft.com/fwlink/p/?LinkID=113216) を参照してください。
<WorkflowParameters>
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
出力
出力型は、コマンドレットが出力するオブジェクトの型です。
- Microsoft.Management.Infrastructure.CimInstance#DnsServerClientSubnet
使用例
Example 1: Add an IPv4 address to a client subnet
The first command creates a client subnet named AsiaSubnet by using the Add-DnsServerClientSubnet cmdlet.
The second command adds an IPv4 subnet to the AsiaSubnet client subnet. The command uses the Format-List cmdlet to control the appearance of the output. For more information, type Get-Help Format-List
.
The command includes the PassThru parameter. The added IPv4 address appears in the computer output.
PS C:\> Add-DnsServerClientSubnet -Name "AsiaSubnet" -IPv6Subnet 0db8::1/28 -PassThru -IPv4Subnet 1.10.0.1/8
PS C:\> Set-DnsServerClientSubnet -Name "AsiaSubnet" -Action ADD -IPv4Subnet 192.168.0.4/16 -PassThru | Format-List
Example 2: Replace an IPv6 address in a client subnet
The first command creates a client subnet named AsiaSubnet that includes the IPv6 address 0db8::1/28.
The second command replaces the IPv6 addresses for the client subnet. The computer output includes the address 0db8::1/8 in place of 0db8::1/28.
PS C:\> Add-DnsServerClientSubnet -Name "AsiaSubnet" -IPv6Subnet 0db8::1/28 -PassThru -IPv4Subnet 10.0.0.1/8
PS C:\> Set-DnsServerClientSubnet -Name "AsiaSubnet" -Action REPLACE -IPv6Subnet 0db8::1/8 -PassThru | Format-List
Example 3: Remove an IPv4 address from a client subnet
The first command creates a client subnet named AsiaSubnet that includes both an IPv4 address and an IPv6 address.
The second command removes the IPv4 address. The computer output displays only the IPv6 address.
PS C:\> Add-DnsServerClientSubnet -Name "AsiaSubnet" -IPv6Subnet 0db8::1/28 -PassThru -IPv4Subnet 10.0.0.1/8
PS C:\> Set-DnsServerClientSubnet -Name "AsiaSubnet" -Action REMOVE -IPv4Subnet 10.0.0.1/8 -PassThru | Format-List