| external help file | DSInternals.PowerShell.dll-Help.xml |
|---|---|
| Module Name | DSInternals |
| online version | https://github.com/MichaelGrafnetter/DSInternals/blob/master/Documentation/PowerShell/Save-DnsServerResourceRecord.md |
| schema | 2.0.0 |
Saves DNS resource records retrieved from Active Directory to one or more DNS zone files.
Save-DnsServerResourceRecord -InputObject <DnsResourceRecord> [-DirectoryPath] <String> [-Force]
[<CommonParameters>]
Saves DNS resource records retrieved from Active Directory to DNS zone files.
The cmdlet creates one .dns file for each DNS zone in the target directory.
Existing zone files are not overwritten unless the Force parameter is specified.
PS C:\> Get-ADDBDnsServerResourceRecord -DatabasePath 'C:\Backup\ntds.dit' |
Save-DnsServerResourceRecord -Path '.\Zones' -VerboseExtracts all DNS resource records from the offline Active Directory database file and saves them to DNS zone files in the Zones directory. The cmdlet writes verbose information for each zone file that it creates.
PS C:\> Get-ADDBDnsServerResourceRecord -DatabasePath '.\ntds.dit' |
Where-Object Zone -eq 'contoso.com' |
Save-DnsServerResourceRecord -Path '.\Zones' -ForceSaves records from the contoso.com zone to .\Zones\contoso.com.dns and overwrites an existing file if needed.
Specifies the path to a target directory where DNS zone files will be saved.
Type: String
Parameter Sets: (All)
Aliases: Path, OutputPath, OutputDirectory, OutDir
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseIndicates that existing DNS zone files should be overwritten.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies a DNS resource record to save to a DNS zone file.
Type: DnsResourceRecord
Parameter Sets: (All)
Aliases: Record, DnsRecord
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
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.