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.

Featured Links