Share via


Get-DnsServerQueryResolutionPolicy

Get-DnsServerQueryResolutionPolicy

Gets policies for query resolution from a DNS server.

構文

Parameter Set: Server
Get-DnsServerQueryResolutionPolicy [[-Name] <String> ] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-InformationAction <System.Management.Automation.ActionPreference> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <System.String> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>] [ <WorkflowParameters>]

Parameter Set: Zone
Get-DnsServerQueryResolutionPolicy [[-Name] <String> ] [-ZoneName] <String> [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-InformationAction <System.Management.Automation.ActionPreference> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <System.String> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>] [ <WorkflowParameters>]

詳細説明

The Get-DnsServerQueryResolutionPolicy cmdlet gets policies for query resolution from a Domain Name System (DNS) server. Specify a zone by name to get zone level policies. If you do not specify a zone, this cmdlet gets server level policies.

パラメーター

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

-Name<String>

Specifies the name of the policy to get.

Aliases

none

必須/オプション

false

位置

2

既定値

none

パイプライン入力の受け入れ

true(ByPropertyName)

ワイルドカード文字の受け入れ

false

-ThrottleLimit<Int32>

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

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-ZoneName<String>

Specifies the name of a DNS zone from which to get the zone level policy. The zone must exist on the DNS server.

Aliases

none

必須/オプション

true

位置

3

既定値

none

パイプライン入力の受け入れ

true(ByPropertyName)

ワイルドカード文字の受け入れ

false

<CommonParameters>

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

<WorkflowParameters>

入力

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

出力

出力型は、コマンドレットが出力するオブジェクトの型です。

  • Microsoft.Management.Infrastructure.CimInstance#DnsServerPolicy[]

使用例

Example 1: Get all zone level policies

This command gets all the zone level policies for the zone named contoso.com. The command uses the Format-List cmdlet to control the appearance of the output. For more information, type Get-Help Format-List.

PS C:\> Get-DnsServerQueryResolutionPolicy -ZoneName "contoso.com" | Format-List *

Example 2: Get a specific zone level policy

This command gets the zone level policy named NorthAmericaPolicy in the domain named contoso.com.

PS C:\> Get-DnsServerQueryResolutionPolicy -Name "NorthAmericaPolicy" -ZoneName "contoso.com" | Format-List *

Example 3: Get all server level policies

This command gets all the server level policies.

PS C:\> Get-DnsServerQueryResolutionPolicy | Format-List *

Example 4: Get a specific server level policy

This command gets the server level policy named DropPolicy.

PS C:\> Get-DnsServerQueryResolutionPolicy -Name "DropPolicy"

Example 5: Display all server level and zone level policies

The first command gets configuration settings for the current DNS server by using Get-DnsServer cmdlet, and then stores those values in the $DnsServer variable.

The second command passes the ServerPolicies property of each object stored in $DnsServer to Format-List by using the pipeline operator. This example displays both server level and zone level policies.

PS C:\> $DnsServer = Get-DnsServer
PS C:\> $DnsServer.ServerPolicies | Format-List *

Example 6: Display the criteria in a DNS policy

The first command gets a policy object, and then stores it in the $Policy variable.

The second command displays the CriteriaType and Criteria in $Policy.

PS C:\> $Policy = Get-DnsServerQueryResolutionPolicy -Name "SamplePolicy" -ZoneName "contoso.com"
PS C:\> $Policy.Criteria

関連項目

Add-DnsServerQueryResolutionPolicy

Remove-DnsServerQueryResolutionPolicy

Set-DnsServerQueryResolutionPolicy

Get-DnsServer

Add-DnsServerZoneTransferPolicy