| external help file | DSInternals.PowerShell.dll-Help.xml |
|---|---|
| Module Name | DSInternals |
| online version | https://github.com/MichaelGrafnetter/DSInternals/blob/master/Documentation/PowerShell/Get-ADDBDnsServerResourceRecord.md |
| schema | 2.0.0 |
Retrieves DNS resource records from an Active Directory database.
Get-ADDBDnsServerResourceRecord [-IncludeTombstones] [-IncludeRootHints] [-IncludeTrustAnchors]
[-ZoneName <String>] -DatabasePath <String> [-LogPath <String>] [<CommonParameters>]
Retrieves DNS resource records from an offline Active Directory database. The output can include tombstoned records and root hints if specified.
PS C:\> Get-ADDBDnsServerResourceRecord -DatabasePath 'C:\IFM Backup\Active Directory\ntds.dit' |
Where-Object Zone -eq 'contoso.com' |
Where-Object Type -in SOA,NS,A,CNAME,MX,CNAME |
Sort-Object -Property Name
<# Sample Output:
@ IN SOA dc01.contoso.com. hostmaster.contoso.com. (
186 ; serial number
900 ; refresh
600 ; retry
86400 ; expire
3600 ) ; default TTL
@ NS dc01.contoso.com.
@ NS dc02.contoso.com.
@ 600 A 10.213.0.3
@ 600 A 10.213.0.9
_msdcs NS dc01.contoso.com.
certauth.login A 10.213.0.4
dc01 A 10.213.0.3
dc02 A 10.213.0.9
DomainDnsZones 600 A 10.213.0.9
DomainDnsZones 600 A 10.213.0.3
ForestDnsZones 600 A 10.213.0.9
ForestDnsZones 600 A 10.213.0.3
ftp CNAME www
login A 10.213.0.4
#>Extracts all DNS resource records from the offline Active Directory database file and displays the SOA, NS, A, CNAME, MX, and CNAME records from the contoso.com zone in a text format compatible with Windows Server and BIND zone files.
Specifies the path to a domain database, for instance, C:\Windows\NTDS\ntds.dit.
Type: String
Parameter Sets: (All)
Aliases: Database, DBPath, DatabaseFilePath, DBFilePath
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseIndicates that root hints should be included in the output.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: RootHints, RootServers
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseIndicates that tombstoned DNS records should be included in the output.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: Tombstones, IncludeTombstoned
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseIndicates that DNSSEC trust anchor records should be included in the output.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: TrustAnchors
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the path to a directory where the transaction log files are located. For instance, C:\Windows\NTDS. The default log directory is the one that contains the database file itself.
Type: String
Parameter Sets: (All)
Aliases: Log, TransactionLogPath
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseRestricts the output to records belonging to the DNS zone with the specified name. The value is matched case-insensitively against the zone's fully qualified domain name (FQDN).
Type: String
Parameter Sets: (All)
Aliases: Zone, DnsZone
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Get-ADDBDnsServerZone Save-DnsServerResourceRecord Get-ADDBDomainController