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).