-
New Script: Set-DNSScavengeServer
November 1, 2019
I do a lot of Active Directory Health Check and Remediation projects. Going all the way back to my first conference presentation, 95% of Active Directory (AD) issues trace their roots to DNS. One of the DNS culprits is not having DNS Aging and Scavenging configured correctly. This new script will configure the DNS scavenging server for every Active Directory-integrated Forward and Reverse Lookup Zone.
I have been meaning to write this script for a number of years, but never got around to it. Well, I finally got my “Round ToIt”.
I was working on an AD remediation project where the customer had over 100 AD-integrated Forward and Reverse Lookup Zones to configure. I did not want to issue over 100 “dnscmd” commands, copying and pasting the name of every zone.
DNS Aging and Scavenging is configured in five places.
- DNS Server
- DNS Server Properties
- Forward Lookup Zones
- Reverse Lookup Zones
- Then via dnscmd.exe, set a scavenging server for every Forward and Reverse Lookup Zone
This new script handles item number five.
As with all my scripts, there is full help text available.
Since Microsoft only started supplying DNS PowerShell cmdlets with Windows Server 2012, PowerShell V4 or later is required. At least one Windows Server 2012 or later is required. Windows 8, or later, with Remote Server Administration Tools is required is you want to run the script from a non-server.
Because this script makes changes to DNS, there is support for -WhatIf and -Confirm.
The script creates a text file that contains the Before and After settings.
For the customer with over 100 zones to configure, running the script took less than five seconds.
If there is anything you would like added to the script, send me an email to webster@carlwebster.com.
As always, thanks to Michael B. Smith for the code review, corrections, and suggestions.
You can always find the most current script by going to https://www.carlwebster.com/where-to-get-copies-of-the-documentation-scripts/
Thanks
Webster
2 Responses to “New Script: Set-DNSScavengeServer”
Leave a Reply
April 19, 2022 at 10:26 pm
Is there an alternative download location
Yours is flagged as a file server and blocked GRRR
🙂
April 20, 2022 at 4:40 am
I emailed you another link to see if that works.
Webster