Have used code from another post at Experts-Exchange (thanks) to try to delete unneccessary zones as the domains have expired. As no way to delete a zone file have used code as suggested but it is not fully working for me!
Have changed code slighly and used WHERE domainname = "domainsrequriedtobedelete
d.com' and not WHERE OwnerName = 'an.owner.name' ";
As the SOA record still remains after running the code although A,CNAME and NS records have been deleted - does anybody know why and how to delete it?
also the code takes a long time to run 20 seconds to delete records for 1 domains?
string query = "SELECT * FROM MicrosoftDNS_ResourceRecord WHERE OwnerName = 'an.owner.name' ";
ManagementObjectSearcher searcher = new ManagementObjectSearcher(_scope, new ObjectQuery(query));
ManagementObjectCollection collection = searcher.Get();
foreach (ManagementObject o in collection)