$Zone = „domain.com“
Krijgen-Dns $Zone - Overdracht |
Uitgezocht-voorwerp - breid Antwoord uit |
Waar-voorwerp {$_.Type - NotMatch „SOA|NS“} |
ForEach-voorwerp {
# Zie of reeds bestaat het verslag
Als ((krijgen-DnsRecord - Naam $_.Name - Type $_.RecordType - Streek $Zone) - eq $Null) {
Schakelaar ($_.Type) {
„A“ {nieuw-DnsRecord - Naam $_.Name - Adres $_.IPAddress - RecordType A - Streek $Zone}
„CNAME“ {nieuw-DnsRecord - Naam $_.Name - Hostname $_.Hostname - RecordType CNAME - Streek $Zone}
}
}
}
|