Viewing a Server’s Zones in AD

Posted: March 27, 2010 in Active Directory, Server, System Information


You want to view the zones on a server.


Using a graphical user interface

  1. Open the DNS Management snap-in.
  2. Right-click on DNS in the left pane and select “Connect to DNS Server.”
  3. Enter the server you want to connect to and click Enter.
  4. In the left pane, expand the server and click Forward Lookup Zones and Reverse Lookup Zones to view the hosted zones.

Using a command-line interface

> dnscmd <DNSServerName> /enumzones

Using VBScript

‘ This code lists the zones that are hosted by the specified server.


strServer = “<DNSServerName>” ‘ e.g.


set objDNS = GetObject(“winMgmts:\\” & strServer & “\root\MicrosoftDNS”)

set objDNSServer = objDNS.Get(“MicrosoftDNS_Server.Name=””.”””)

set objZones = objDNS.ExecQuery(“Select * from MicrosoftDNS_Zone ” & _

“Where DnsServerName = ‘” & _

objDNSServer.Name & “‘”)

WScript.Echo “Zones on ” & objDNSServer.Name

for each objZone in objZones

WScript.Echo ” ” & objZOne.Name



Using a graphical user interface

When you click on either the Forward Lookup Zones or Reverse Lookup Zones in the lefthand pane of the DMS MMC, the right pane contains a Type column that displays the zone type for each zone.

Using a command-line interface

When using the /enumzones switch without any more parameters, it displays all zones on the server. You can specify additional filters that limit the types of zones returned. With the Windows 2000 version of dnscmd, you can specify up to two filters (for example, using the /enumzones / primary / forward switch combination will display all primary forward zones on the server):









With the Windows Server 2003 version of dnscmd, the filter behavior has changed. Instead of having two levels of criteria, you can specify one or more of the following:


Lists both standard and Active Directoryintegrated primary zones


Lists all standard secondary zones


Lists all zones that forward unresolvable queries to another DNS server


Lists all stub zones hosted on a server


Lists zones that are loaded into cache on the server


Lists zones that were created automatically during the DNS server installation


Lists all forward lookup zones


Lists all reverse lookup zones


Lists all Active Directoryintegrated zones


Lists zones that are stored in text files


Lists zones that are stored in the DomainDNSZones partition


Lists zones that are stored in the ForestDNSZones partition


Lists zones that are stored in a user-created directory partition


Lists zones that are stored in the domain NC

/DirectoryPartition <PartitionName>

Lists zones that are stored in a particular application partition

Using VBScript

A WQL query was used to find all MicrosoftDNS_Zone objects. You can add additional criteria to the WQL Select statement to return a subset of zones supported on the server.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s