Skip to main content This browser is no longer supported. Show
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Get-DnsServerResourceRecord
Gets resource records from a specified DNS zone. In this articleSyntax
DescriptionThe Get-DnsServerResourceRecord cmdlet gets the following information for a specified resource record from a Domain Name System (DNS) zone:
ExamplesExample 1: Get all resource records in a specified zone
This command gets all DNS server resource records in a zone named contoso.com. Example 2: Get all resource records in a zone for a specified node
This command gets all DNS server resource records in a zone named contoso.com from the node named Admin01. Example 3: Get all resource records in a zone by specified host name
This command gets all DNS server resource records in a zone named contoso.com that have the name Host02. The command is similar to the one in example 2, but in this case the command uses a host name instead of a node name. Example 4: Get all A records in a zone by specified host and specified type
This command gets all A records in a zone named contoso.com that have the name Host03. Example 5: Get all A records in a specified zone
This command gets all A records in a zone named contoso.com. Example 6: Get all NS records at the root of a specified zone
This command gets all NS records at the root of a zone named contoso.com. Parameters-AsJobRuns 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 For more information about Windows PowerShell background jobs, see about_Jobs.
-CimSessionRuns 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.
-ComputerNameSpecifies a DNS server. If you do not specify this parameter, the command runs on the local system. 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.
-NameSpecifies a node name within the selected zone. If not specified, it defaults to the root (@) node.
-NodeIndicates that the command returns only the resource records at the root of the node specified by the Name parameter. If Node is not specified then both the root and any child records in the node are returned.
-RRTypeSpecifies the type of resource record. The acceptable values for this parameter are:
-ThrottleLimitSpecifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of
-TypeSpecifies a type of record to get.
-VirtualizationInstanceSpecifies the virtualization instance in which the zone will be added. A virtualization instance is logical partition in a DNS Server, which is capable of independently hosting zones and zone scopes. Same name zones and zone scopes can be hosted in different virtualization instances. This parameter is optional and if not provided it will add the zone into the default virtualization instance which is functionally equivalent to a standard DNS server.
-ZoneNameSpecifies the name of a DNS server zone.
-ZoneScopeSpecifies the name of a zone scope.
OutputsCimInstance[]
FeedbackSubmit and view feedback for Additional resourcesIn this articleWhich DNS zone type contains a readThere are different types of DNS Zones. Secondary Zone: Holds a read-only copy of the primary zone information. It cannot perform updates and can only receive them from the primary zone. It can, however, perform as an authoritative zone to alleviate some workload from the primary.
What type of DNS zone contains a master copy of the zone database?Primary zone (standard)—Standard Primary zones are stored in a flat file on the DNS Server. The Primary zone is considered the master copy of the zone database file. All updates to the zone must be performed on the Primary zone server. Secondary zone—Secondary zones are read-only copies of the Primary zones.
Which zone contains a readPrimary DNS zone. Primary (Master) zones, contain a read/write copy of the zone data. There could be only one Master zone on one DNS server at a time. All the DNS records added manually or automatically, are written in this Primary zone of the DNS server.
What type of DNS zone provides an authoritative read/write copy of the zone?Primary Zone
This is the read-write copy of the zone data. Zone updates are made to this zone and then replicated to the secondary zones.
|