How to list all static hosts in DNS

Share this:

In this Tutorial we are going over the process to list all static entries in any given DNZ zone.


If you are responsible to manage the Active Directory DNS zones, you should be looking at scavenging feature to keep the name resolution working, but it is important to remove static entries when they are no longer need it and keep them to a minimum.

The manual process is using DNS Manager where the administrator can select a zone, and then use the TimeStamp column to identify static entries.


However that is a paramount task when you have thousands of entries. Using the following Powershell we can list all entries and create an action plan to remove obsolete entries.

Get-DNSServerResourceRecord <zone> | where-object { $_.TimeStamp –eq $null}


If you are curious to find out how many static entries you have in you environment, then just run this cmdlet.

(Get-DNSServerResourceRecord <zone> | where-object { $_.TimeStamp –eq $null}).count

Written by Anderson Patricio

Anderson Patricio

Anderson Patricio is a Canadian MVP in Cloud and Datacenter Management, and Office Server and Services, besides the Microsoft Award he also holds a Solutions Master (MCSM) in Exchange and several other certifications. Anderson has been contributing to the Microsoft Community with articles, tutorials, blog posts, twitter, forums and book reviews. He is a regular contributor here at,, and Anderson (Portuguese).

Related Post

Installing Skype for Business – Part 3 In this third Tutorial of our series we are going to work on the DNS portion of the deployment. Like its predecessors, there are a lot of certificates...
How to update the DNS root hints Updating the root servers on the DNS servers, by default when DNS server is installed a list of root servers comes with the server. In this Tutorial w...
Managing network settings on Red Hat Enterprise Li... By default in Red Hat Enterprise Linux 7.3 (the version which this article was written) the default network service is done by NetworkManager which is...
Using DNS Console cache to troubleshoot a geo-loca... How to use DNS Manager to troubleshoot a geo-location restriction in the firewall. Solution I had this interesting situation in one of my customers...