Monday, August 31, 2015

Resolve-DNSName: useful addition to Powershell commands

Resolve-DNSName (available in Windows 2012 R2 version of Powershell) is very useful command to obtain various statistics about DNS zone.

For example, if zones.txt file consists of the zones to check following command will help to find SOA record for every zone in the file:

Get-Content zones.txt | Resolve-DnsName -Type SOA | Select-Object Name, PrimaryServer | Export-Csv zones.csv -notype

Good article about usage of the command: http://exchangeserverpro.com/use-powershell-to-quickly-check-multiple-mx-records/

GPO settings are not listed (as they should per Microsoft article)

You may notice that the settings to be configured by GPO are not listed in your configuration.
The reason of that: specific settings are issued with KB update that got installed on the domain controllers, but not into the SYSVOL location of domain controllers.
To fix the issue you have to manually move the new policy definitions files to the proper location:

  1. Copy @.adml file from c:\windows\policydefinitions\en-us to your local sysvol location under sysvol\policydefinitions\en-us.
  2. Copy @.admx file from c:\windows\policydefinitions to your local sysvol location under sysvol\policydefinitions.