You saw how to discover the zones on a DNS server in the first post in this series. Now its time to discover the records in a zone. For that you need Get-DnsServerResourceRecord.
The syntax is:
Get-DnsServerResourceRecord [-ZoneName] <string> [[-Name] <string>] [-Type] <ushort> [-ComputerName <string>] [-Node] [-ZoneScope <string>] [-VirtualizationInstance <string>] [-CimSession <CimSession[]>] [-ThrottleLimit <int>] [-AsJob] [<CommonParameters>]
Get-DnsServerResourceRecord [-ZoneName] <string> [[-Name] <string>] [-ComputerName <string>] [-Node] [-ZoneScope <string>] [-VirtualizationInstance <string>] [-RRType <string>] [-CimSession <CimSession[]>] [-ThrottleLimit <int>] [-AsJob] [<CommonParameters>]
Use as
PS> Get-DnsServerResourceRecord -ZoneName manticore.org -RRType A
or
PS> Get-DnsServerResourceRecord -ZoneName manticore.org -Type 1
The following record types can be used with RRType
HInfo
Afsdb
Atma
Isdn
Key
Mb
Md
Mf
Mg
MInfo
Mr
Mx
NsNxt
Rp
Rt
Wks
X25
A
AAAA
CName
Ptr
Srv
Txt
Wins
WinsR
Ns
Soa
NasP
NasPtr
DName
Gpos
Loc
DhcId
Naptr
RRSig
DnsKey
DS
NSec
NSec3
NSec3Param
I haven’t found any documentation that links the type number to the string version of the record type