Hi All,
I am trying to get the Get-DnsServerResourceRecord cmdlet to export A records and CNAME records including the IP address to CSV file.
When I run in the powergui script editor I can see the IP address recorddata however when same command is used to export result to csv the IP is replaced with DnsServerResourceRecordA which is the type of record?
Any help would be fantastic! :-)
Get-DnsServerResourceRecord -ZoneName Zone1 | Where-Object {$_.RecordType -eq "CNAME" -or $_.RecordType -eq "A" } | Export-Csv C:\scripts\DNS.csv -NoTypeInformation