I finally got DNS scavenging configured in our environment. It’s working great, no big disasters. I was browsing the DNS manager (so much faster now that we got rid of those 6,000+ resource records we didn’t need) and I noticed two
TXT records that I created as a test last week. I didn’t need them anymore, but instead of deleting them I thought I’d just set them to expire and let scavenging take care of it. Funny thing is, the setting just wouldn’t stick. No errors, nothing preventing me from doing it, it just kept reverting to static.
Reproducing the Problem
Our DNS servers are still 2008 R2 so I tried it out in our 2012 test domain. I created a new text record from the DNS Manager console which makes it static by default.
From there, I can view the details of the record, and see that the Delete this record when it becomes stale checkbox is cleared. If I check it, then click Apply the Record time stamp box will fill with the date, like so:
Great! Click OK, then go back to the list of records in DNS manager. It will still say
static. Hm, if I look at the record’s properties again, it still shows the box checked and the time stamp, so I probably just have to refresh the view.
View the properties: the checkbox is cleared and the timestamp is gone, like I never set it in the first place!
PowerShell to the Rescue
Luckily, we can fix this easily by setting this from PowerShell instead:
It will confirm that you want to make the change. You can use
-Force if you want to do it without prompting.
Now I can refresh the console, view the properties of the resource record and see that the setting is actually sticking.
Other RR Types?
So far, I haven’t tested this on other resource record types. It appears to be a bug in the DNS Manager MMC Snap-In. It definitely works with
PTR records for me.
If you notice this behavior on any other types, comment here so I can add them to the article.