PowerShell/Scripts/train_dns_cache.ps1

18 lines
402 B
PowerShell
Raw Normal View History

2020-06-11 16:15:23 +02:00
#!/snap/bin/powershell
#
# PowerShell Script to Train the DNS Cache
# ----------------------------------------
# Author: Markus Fleschutz
# Source: github.com/fleschutz/PowerShell
# License: CC0
$DomainTable = import-csv refresh_domains.csv
foreach($Row in $DomainTable) {
$DomainName = $Row.Domain
write-progress "Training $DomainName ..."
$Ignore = dig $DomainName
}
write-host "Done."
exit 0