description | external help file | Module Name | ms.date | online version | schema | title |
---|---|---|---|---|---|---|
Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell. |
PS_DnsServerQueryResolutionPolicy_v1.0.0.cdxml-help.xml |
DnsServer |
12/20/2016 |
2.0.0 |
Get-DnsServerQueryResolutionPolicy |
Gets policies for query resolution from a DNS server.
Get-DnsServerQueryResolutionPolicy [[-Name] <String>] [-ComputerName <String>] [-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>] [-AsJob] [<CommonParameters>]
Get-DnsServerQueryResolutionPolicy [[-Name] <String>] [-ComputerName <String>] [-ZoneName] <String>
[-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-AsJob] [<CommonParameters>]
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.
PS C:\> Get-DnsServerQueryResolutionPolicy -ZoneName "contoso.com" | Format-List *
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 -Name "NorthAmericaPolicy" -ZoneName "contoso.com" | Format-List *
Action : Allow
AppliesOn : QueryProcessing
Condition : And
Content : {DnsServerPolicyContent}
Criteria : {DnsServerPolicyCriteria}
IsEnabled : True
Level : Zone
Name : NorthAmericaPolicy
ProcessingOrder : 1
ZoneName : contoso.com
PSComputerName :
CimClass : root/Microsoft/Windows/DNS:DnsServerPolicy
CimInstanceProperties : {Action, AppliesOn, Condition, Content...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
This command gets the zone level policy named NorthAmericaPolicy in the domain named contoso.com.
PS C:\> Get-DnsServerQueryResolutionPolicy | Format-List *
Action : Ignore
AppliesOn : QueryProcessing
Condition : And
Content :
Criteria : {DnsServerPolicyCriteria}
IsEnabled : True
Level : Server
Name : DropPolicy
ProcessingOrder : 1
ZoneName :
PSComputerName :
CimClass : root/Microsoft/Windows/DNS:DnsServerPolicy
CimInstanceProperties : {Action, AppliesOn, Condition, Content...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
Action : Ignore
AppliesOn : QueryProcessing
Condition : And
Content :
Criteria : {DnsServerPolicyCriteria}
IsEnabled : True
Level : Server
Name : DropPolicyMalicious
ProcessingOrder : 2
ZoneName :
PSComputerName :
CimClass : root/Microsoft/Windows/DNS:DnsServerPolicy
CimInstanceProperties : {Action, AppliesOn, Condition, Content...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
Action : Ignore
AppliesOn : QueryProcessing
Condition : And
Content :
Criteria : {DnsServerPolicyCriteria}
IsEnabled : True
Level : Server
Name : DropPolicyQType
ProcessingOrder : 3
ZoneName :
PSComputerName :
CimClass : root/Microsoft/Windows/DNS:DnsServerPolicy
CimInstanceProperties : {Action, AppliesOn, Condition, Content...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
Action : Allow
AppliesOn : Recursion
Condition : And
Content : {DnsServerPolicyContent}
Criteria : {DnsServerPolicyCriteria}
IsEnabled : True
Level : Server
Name : SplitBrainPolicy
ProcessingOrder : 1
ZoneName :
PSComputerName :
CimClass : root/Microsoft/Windows/DNS:DnsServerPolicy
CimInstanceProperties : {Action, AppliesOn, Condition, Content...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
This command gets all the server level policies.
PS C:\> Get-DnsServerQueryResolutionPolicy -Name "DropPolicy"
Name ProcessingOrder IsEnabled Action
---- --------------- --------- ------
DropPolicy 1 True Ignore
This command gets the server level policy named DropPolicy.
PS C:\> $DnsServer = Get-DnsServer
PS C:\> $DnsServer.ServerPolicies | Format-List *
Action : Ignore
AppliesOn : QueryProcessing
Condition : And
Content :
Criteria : {DnsServerPolicyCriteria}
IsEnabled : True
Level : Server
Name : DropPolicy
ProcessingOrder : 1
ZoneName :
PSComputerName :
CimClass : root/Microsoft/Windows/DNS:DnsServerPolicy
CimInstanceProperties : {Action, AppliesOn, Condition, Content...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
Action : Ignore
AppliesOn : QueryProcessing
Condition : And
Content :
Criteria : {DnsServerPolicyCriteria}
IsEnabled : True
Level : Server
Name : DropPolicyMalicious
ProcessingOrder : 2
ZoneName :
PSComputerName :
CimClass : root/Microsoft/Windows/DNS:DnsServerPolicy
CimInstanceProperties : {Action, AppliesOn, Condition, Content...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
Action : Ignore
AppliesOn : QueryProcessing
Condition : And
Content :
Criteria : {DnsServerPolicyCriteria}
IsEnabled : True
Level : Server
Name : DropPolicyQType
ProcessingOrder : 3
ZoneName :
PSComputerName :
CimClass : root/Microsoft/Windows/DNS:DnsServerPolicy
CimInstanceProperties : {Action, AppliesOn, Condition, Content...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
Action : Allow
AppliesOn : Recursion
Condition : And
Content : {DnsServerPolicyContent}
Criteria : {DnsServerPolicyCriteria}
IsEnabled : True
Level : Server
Name : SplitBrainPolicy
ProcessingOrder : 1
ZoneName :
PSComputerName :
CimClass : root/Microsoft/Windows/DNS:DnsServerPolicy
CimInstanceProperties : {Action, AppliesOn, Condition, Content...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
Action : Allow
AppliesOn : QueryProcessing
Condition : And
Content : {DnsServerPolicyContent}
Criteria : {DnsServerPolicyCriteria}
IsEnabled : True
Level : Zone
Name : AmericaPolicy
ProcessingOrder : 1
ZoneName : contoso.com
PSComputerName :
CimClass : root/Microsoft/Windows/DNS:DnsServerPolicy
CimInstanceProperties : {Action, AppliesOn, Condition, Content...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
Action : Allow
AppliesOn : QueryProcessing
Condition : And
Content : {DnsServerPolicyContent}
Criteria : {DnsServerPolicyCriteria}
IsEnabled : True
Level : Zone
Name : EuropePolicy
ProcessingOrder : 2
ZoneName : contoso.com
PSComputerName :
CimClass : root/Microsoft/Windows/DNS:DnsServerPolicy
CimInstanceProperties : {Action, AppliesOn, Condition, Content...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
Action : Allow
AppliesOn : QueryProcessing
Condition : And
Content : {DnsServerPolicyContent, DnsServerPolicyContent}
Criteria : {DnsServerPolicyCriteria}
IsEnabled : True
Level : Zone
Name : LBPolicy
ProcessingOrder : 3
ZoneName : contoso.com
PSComputerName :
CimClass : root/Microsoft/Windows/DNS:DnsServerPolicy
CimInstanceProperties : {Action, AppliesOn, Condition, Content...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
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:\> $Policy = Get-DnsServerQueryResolutionPolicy -Name "SamplePolicy" -ZoneName "contoso.com"
PS C:\> $Policy.Criteria
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.
Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.
The cmdlet immediately returns an object that represents the job and then displays the command prompt.
You can continue to work in the session while the job completes.
To manage the job, use the *-Job
cmdlets.
To get the job results, use the Receive-Job cmdlet.
For more information about Windows PowerShell background jobs, see about_Jobs.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.
Type: CimSession[]
Parameter Sets: (All)
Aliases: Session
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
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.
Type: String
Parameter Sets: (All)
Aliases: Cn
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the name of the policy to get.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the maximum number of concurrent operations that can be established to run the cmdlet.
If this parameter is omitted or a value of 0
is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer.
The throttle limit applies only to the current cmdlet, not to the session or to the computer.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the name of a DNS zone from which to get the zone level policy. The zone must exist on the DNS server.
Type: String
Parameter Sets: Zone
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Add-DnsServerQueryResolutionPolicy
Remove-DnsServerQueryResolutionPolicy