Get-DnsServerQueryResolutionPolicy
Mis à jour: mai 2015
Get-DnsServerQueryResolutionPolicy
Gets policies for query resolution from a DNS server.
Syntaxe
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>]
Description détaillée
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.
Paramètres
-CimSession<CimSession[]>
Exécute l'applet de commande dans une session distante ou sur un ordinateur distant. Entrez un nom d'ordinateur ou un objet de session, tels que le résultat d'une applet de commande New-CimSession ou Get-CimSession. La valeur par défaut est la session en cours sur l'ordinateur local.
Alias |
Session |
Requis ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l'entrée de pipeline ? |
false |
Accepter les caractères génériques ? |
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.
Alias |
Cn |
Requis ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l'entrée de pipeline ? |
false |
Accepter les caractères génériques ? |
false |
-InformationAction<System.Management.Automation.ActionPreference>
Alias |
infa |
Requis ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l'entrée de pipeline ? |
false |
Accepter les caractères génériques ? |
false |
-InformationVariable<System.String>
Alias |
iv |
Requis ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l'entrée de pipeline ? |
false |
Accepter les caractères génériques ? |
false |
-Name<String>
Specifies the name of the policy to get.
Alias |
none |
Requis ? |
false |
Position ? |
2 |
Valeur par défaut |
none |
Accepter l'entrée de pipeline ? |
true(ByPropertyName) |
Accepter les caractères génériques ? |
false |
-ThrottleLimit<Int32>
Spécifie le nombre maximal d'opérations simultanées qui peuvent être établies pour exécuter l'applet de commande. Si ce paramètre est omis ou si la valeur 0
est entrée, Windows PowerShell® calcule un seuil de limitation optimal pour l'applet de commande en fonction du nombre d'applets de commande CIM exécutées sur l'ordinateur. Le seuil de limitation s'applique uniquement à l'applet de commande en cours, non pas à la session ou à l'ordinateur.
Alias |
none |
Requis ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l'entrée de pipeline ? |
false |
Accepter les caractères génériques ? |
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.
Alias |
none |
Requis ? |
true |
Position ? |
3 |
Valeur par défaut |
none |
Accepter l'entrée de pipeline ? |
true(ByPropertyName) |
Accepter les caractères génériques ? |
false |
<CommonParameters>
Cette applet de commande prend en charge les paramètres courants : -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer et -OutVariable. Pour plus d'informations, consultez . about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
<WorkflowParameters>
Entrées
Le type d'entrée correspond au type des objets que vous pouvez adresser à l'applet de commande.
Sorties
Le type de sortie correspond au type des objets que l'applet de commande émet.
- Microsoft.Management.Infrastructure.CimInstance#DnsServerPolicy[]
Exemples
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
Rubriques connexes
Add-DnsServerQueryResolutionPolicy
Remove-DnsServerQueryResolutionPolicy