Viewing the zones on a DNS server

by Mitch Tulloch [Published on 2 Sept. 2009 / Last Updated on 16 March 2009]

You can use the Dnscmd command to view a list of the zones on a DNS server.

You can use the Dhscmd command to view a list of the zones on a DNS server.

For example, to view the zones on the local DNS server do this:

    C:\Users\administrator>dnscmd /enumzones    
    Enumerated zone list:    
            Zone count = 3    
    Zone name                      Type       Storage         Properties    
     .                              Cache      AD-Domain    
     _msdcs.fabrikam.com            Primary    AD-Forest       Secure    
     fabrikam.com                   Primary    AD-Domain       Secure    

Use this command to view only primary zones on server SEA-SC1:

    C:\Users\administrator>dnscmd /enumzones /primary    
    Enumerated zone list:    
            Zone count = 2    
     Zone name                      Type       Storage         Properties    
     _msdcs.fabrikam.com            Primary    AD-Forest       Secure    
     fabrikam.com                   Primary    AD-Domain       Secure    

Use this command to display zones stored in the domain DNS partition:

    C:\Users\administrator>dnscmd /enumzones /DomainDirectoryPartition    
    Enumerated zone list:    
            Zone count = 2    
     Zone name                      Type       Storage         Properties    
     .                              Cache      AD-Domain    
     fabrikam.com                   Primary    AD-Domain       Secure    

Finally, the following command indicates that DNS server SEA-SC4 is configured as a caching-only DNS server since it doesn't have any zones configured on it:

    C:\Users\administrator>dnscmd SEA-SC4 /enumzones    
    Enumerated zone list:    
            Zone count = 1    
     Zone name                      Type       Storage         Properties    
     .                              Cache      File    

This sample command output can also be found in my book Windows Server 2008 Server Core Administrators Pocket Consultant from Microsoft Press.

The Author — Mitch Tulloch

Mitch Tulloch is a widely recognized expert on Windows administration, networking, and security. He has been repeatedly awarded Most Valuable Professional (MVP) status by Microsoft for his outstanding contributions in supporting users who deploy and use Microsoft platforms, products and solutions. Mitch has published over two hundred articles on different IT websites and magazines, and he has written or contributed to almost two dozen books and is lead author for the Windows 7 Resource Kit from Microsoft Press. For more information, see www.mtit.com .

Latest Contributions

Featured Links