How to delete domain names of Windows server DNS conditional forwarders in batches?

uranus829 66 Reputation points
2021-02-19T04:50:06.527+00:00

How to delete domain names of Windows server DNS conditional forwarders in batches? The conditional forwarder has more than 4,000 records. It would be painful to delete one by one.

Windows for business | Windows Server | User experience | Other
{count} votes

Answer accepted by question author
  1. Anonymous
    2021-02-19T06:06:05.13+00:00

    Hi ,

    Please run the following PowerShell scripts:

    get-dnsserverzone | where-Object{$_.zonetype -eq "Forwarder"} | remove-dnsserverzone -force  
    

    69877-image.png

    69928-image.png

    This script can delete all of your conditional forwarders.

    Best Regards,

    Candy

    --------------------------------------------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. uranus829 66 Reputation points
    2021-02-19T08:02:20.783+00:00

    Thanks you!It is work.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.