Skip to content

{ Category Archives } PowerShell

Administering Microsoft DNS in PowerShell

DNS administration in PowerShell, including tasks like creating zones and adding Host (A) records, can be performed using the WMI interface. Full documentation for the interface is available from Microsoft in the DNS WMI Provider Reference. I have released a PowerShell 2.0 module using the WMI provider here.

Tagged , ,

Returning the OU for an object in AD

Occasionally it can be useful to know how to retrieve the parent, or OU holding an object, from Active Directory. Perhaps the easiest way to do this is using the Parent property.

Tagged , , ,

Modifying DNS records with WMI

Using WMI it is possible to modify any existing record hosted on a Microsoft DNS Server. The method used varies slightly depending on which record type we want to change.

Tagged , , , ,

NTFS, PowerShell, Get-ACL & listing explicit rights

A short script to list explicit rights assigned to a directory structure. It uses the recursive option of ls (an Alias for Get-ChildItem) to drop down through the directory structure.

Tagged , , , ,

Exchange 2007 & Manager Can Update Membership List

I recently went through another migration. One of the post migration tasks was to fix permission to update lists. The “ManagedBy” attribute had been copied across, but not the security descriptor from the group. This show PowerShell script can be run from the Exchange Management Shell to grab the value from ManagedBy and write it [...]

Tagged , , ,

Listing all domains in a forest

These snippets of code shows how to search Active Directory using LDAP to return all domains in the current Forest (based on current authentication).

Tagged , , , , , ,

Microsoft DNS & stale records

This post explains how to identify and report on stale records in a dynamically updated Microsoft DNS zone.

Tagged , , , , , , , ,

Microsoft DNS & static records

Windows 2008 has an improved user interface for DNS. The main console includes details of a records time stamp and whether or not the record is Static. Life isn’t quite so easy with Windows 2003. However, as each static record has a time stamp set to 0 they can be found with a little work.

Tagged , , , , , , , ,