DNSCMD - delete records



To All,

Has anyone been able to successfully delete SRV dns records with this tool.

Were you able to delete all the SRV record types from the DNS server in one
command line or did you need to delete each record type individually?

Do you have an example of the syntax you used to delete the records.

The syntax I am using is;

dnscmd <dnsserverName.FQDN> /RecordDelete <ZoneFQDN> <HostFQDN.> SRV /f

dnscmd <dnsserverName.FQDN> /RecordDelete <ZoneFQDN> <HostFQDN.> SRV 00
100 389 /f

The above line then returns that the record was successfully removed, but
the no records are ever removed.

What I am attempting to do is create a reusable script to delete non
existent domain controllers for a test environment, so when copies are made
of the FSMO masters and put into the test environment a script can be run to
cleanup DC's that no longer exist. I have been able to script all but the
DNS component and it is starting to drive me crazy...

Any thoughts appreciated.



Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question