Submitted by em7add11 on Thu, 03/11/2010 - 11:27am
Yosemite can't copy our DNS backups into a test server because it has a different name. That's quality program design right there.
So here's a helpful set of three commands that does exactly that:
-------
gwmi -namespace root\microsoftdns -class microsoftdns_zone | % { dnscmd /ZoneDelete $_.Name /f }
xcopy \\backup\dns\*.dns C:\WINDOWS\system32\dns\
gci C:\windows\system32\dns\* -include *.dns -exclude cache.dns | % { dnscmd /ZoneAdd $($_.Name.ToString().TrimEnd('.dns')) /Primary /file $_.Name /load }
-------
I can see how something that useful and simple would get left out of a backup application. I mean, who ever needs to test things using a copy of your production config?

dick. you think you KNOW EVERYTHING DONT YOU?
only because I taught it to you.
-Hope