Zum Inhalt

Active Directory W2008 R2 – Remove DNS record with Powershell and WMI

The Simplest way of removing a DNS record from your active directory is using WMI.
With Server 2008 R2 you can use powershell to get the record by setting a filter for the domainname and pipe the object to the wmiobject remove routine like this:

There are several online solutions available, but most of them use the wrong namespace and wrong filter parameter.
This one workls perfectly.

Ensure that you are using an administrative powershell with domainadmin privileges.

Veröffentlicht inAllgemein

Schreibe den ersten Kommentar

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

This site uses Akismet to reduce spam. Learn how your comment data is processed.