Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Get all DNS records for all DNS zones
- Import-Module -Name DnsServer
- [string]$dnsserver = "yourdnsserver"
- ## Pipe this through Out-GridView or ExportCSV -NoTypeInformation
- Get-DnsServerZone -ComputerName $dnsserver | ForEach-Object { $zone = $_ ; Get-DnsServerResourceRecord -ComputerName $dnsserver -ZoneName $zone.zoneName | Select -ExcludeProperty Cim* -Property @{n="ZoneName";e={$zone.zonename}},@{n='IPv4Address';e={$_.RecordData.IPv4Address}},* }
Add Comment
Please, Sign In to add comment