I can create a new zone, add and remove entries for this zone, everything is relatively easy using WMI and System.Management, but for the rest of my life I can’t figure out how to delete a zone. This is not like the method in the WMI documentation:
http://msdn.microsoft.com/en-us/library/ms682123(VS.85).aspx
Any thoughts on how to do this? Trying to keep the DNS server clean when we delete old website clients, but I can only get that I delete all the records in the zone.
EDIT: This is on a Windows Server 2008 R2 computer. And I would be fine with the answer "do not use WMI" if there is an alternative solution that I can execute from a remote machine and code in C #
source
share