PowerShell DNS Commands:Add-DnsServerQueryResolutionPolicy
PowerShell DNS Commands » Add-DnsServerQueryResolutionPolicy

Add-DnsServerQueryResolutionPolicy

DNS Cmdlet: Add-DnsServerQueryResolutionPolicy

Syntax:

Add-DnsServerQueryResolutionPolicy [-PassThru][-ComputerName <String>][-Name] <String>[-Fqdn <String>][-ClientSubnet <String>][-TimeOfDay <String>][-TransportProtocol <String>][-InternetProtocol <String>][[-Action] <String>] [-ApplyOnRecursion][-ServerInterfaceIP <String>][-QType <String>][-ProcessingOrder <UInt32>][[-Condition] <String>][-RecursionScope <String>][-Disable] [-CimSession <CimSession[]>][-ThrottleLimit <Int32>][-AsJob][-WhatIf][-Confirm] [<CommonParameters>]

Parameters and Description:

Parameters Description
PassThru (Type: SwitchParameter) Represents the item that you are currently working with.
ComputerName (Type: String) Enter the IP address, NEBIOS name, FQDN or host name of the remote DNS server.
ClientSubnet (Type: String) Specifies the client subnet criterion. The queries are sent from this client subnet.
TimeOfDay (Type: String) Specifies the time at which the server receives the query.
TransportProtocol (Type: String) Specifies the transport protocol criterion wherein the valid values are TCP and UDP.
InternetProtocol (Type: String) Specifies the IP version of the queries in terms of IPv4 and IPv6 addresses.
ApplyOnRecursion (Type: SwitchParameter) Represents that the policy is a server level recursion policy.
ProcessingOrder (Type: UInt32) Specifies the precedence of the policy where higher integer values have lower precedence and vice versa.
RecursionScope (Type: String) Denotes the scope of recursion. When there is a query match, the DNS server uses this scope's settings to perform query recursion.

For more information on this cmdlet, please refer to this article.

Purpose of this cmdlet:

The Add-DnsServerQueryResolutionPolicy cmdlet lets you add a policy for query resolution to a DNS server. A policy consists of criteria, action, and scopes and the cmdlet combines multiple criteria such as OR and AND, and uses actions such as ALLOW, DENY, or IGNORE.

Example:

$Policies = Get-DnsServerQueryResolutionPolicy -ComputerName "System01"
$Policies | Add-DnsServerQueryResolutionPolicy -ComputerName "Systemo2"
-ThrottleLimit 1

The first command gets all the server level policies from System01 and stores the properties in $Policies variable. The second command adds the policies to the other DNS server mentioned and maintains the ThrottleLimit parameter value 1 in the pipeline.

Download ADManager Plus' 30-day trial to check out how it simplifies group policy objects (GPO) management with its ability to:

  • Create GPOs and link it to the desired domains, OUs, or sites in one step
  • Modify GPOs effortlessly
  • Bulk add, remove, enforce or delete GPO links, and more

Active Directory Management and Reporting Solution

ADManager Plus is a web-based tool which offers the capability to manage Active Directory attributes in bulk easily using CSV files or templates. Get built-in reports on users and export them in CSV, PDF, HTML and XLSX formats.

Unravel end-to-end Active Directory management with ADManager Plus

  •  
  •  
  •  
  • By clicking 'Schedule a personalized demo' you agree to processing of personal data according to the Privacy Policy.
AD User Management / Reports
Active Directory Reporting
Active Directory Management
Related Products