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/

No comments:

Post a Comment