The script takes the domain name you want to remove as an argument, eg:

.\Delete-Secondary.ps1 mydomain.com

it then retrieves the currently configured master server for that secondary domain (using dnscmd as I couldn't find a way to do it natively in powershell), and saves the detail to the log, and then works through each of the AD DNS servers in the domain to delete the zone from them all.

The script pairs up with the previously posted Create-Secondary.ps1 available here http://gallery.technet.microsoft.com/Create-secondary-DNS-zone-3793c0d8

PowerShell
Edit|Remove
# Create-Secondary.ps1 - 16/06/2013 - Keith Langmead 
# Detects all AD DNS servers at the specified path below, loops through all of them 
# and deletes the specified secondary DNS zone from that server before first retrieving 
# and logging the current master server. 
 
$domain=$args[0] 
$zonefile=$domain + ".dns" 
$logfile="delete-secondary.log" 
 
# Check that required arguments have been entered, if not confirm syntax and end. 
if ($domain -eq $NULL) 
{ 
    "Invalid Parameters." 
    "Syntax is : delete-secondary.ps1 <domain name>" 
} 
else 
{ 
    write-output "------ Begin ------" | Out-file $logfile -append 
    get-date | Out-file $logfile -append 
    # Query AD to find the current list of DNS Servers which we'll then loop through  
    # and run the code below on each of them. 
    $dnserversldap = [ADSI]"LDAP://ou=Domain Controllers,dc=mydomain,dc=co,dc=uk" 
    $objsearcher = new-object system.directoryservices.directorysearcher 
    $objsearcher.searchroot = $dnserversldap 
    $objsearcher.filter = "(objectcategory=computer)" 
    $proplist = "name","cn","lastlogon" 
    foreach ($i in $proplist){$objsearcher.PropertiesToLoad.add($i)} 
    $results = $objsearcher.findall() 
    $serverlist = $results.properties.cn 
    #retrieve and log the current master server info just in case 
    $master=(dnscmd /zoneinfo $domain-split '[,]' | ? {$_ -like '*addr=*'} 
    write-output "Current master server for $domain is $master" | out-file $logfile -append 
    # Loop through list of DNS servers 
    foreach ($dnsserver in $serverlist) 
    { 
        try 
        { 
            "Deleting $domain from $dnsserver" 
            write-output "Deleting $domain from $dnsserver" | Out-file $logfile -append 
             
            Remove-DnsServerZone -Name $domain -ComputerName $dnsserver -Force 
            "Successfully deleted $domain from $dnsserver" 
            write-output "Successfully deleted $domain from $dnsserver" | Out-file $logfile -append 
        } 
        catch 
        { 
            "WARNING! An error occurred deleting $domain from $dnsserver" 
            "The error details are - $Error[0]" 
            write-output "WARNING! An error occurred deleting $domain from $dnsserver" | Out-file $logfile -append 
            write-output "The error details are - $Error[0]" | Out-file $logfile -append 
        } 
    } 
    write-output "-------- End ---------" | Out-file $logfile -append 
}