mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-06-14 17:06:55 +02:00
Changed to use nslookup
This commit is contained in:
parent
52c1b4035a
commit
022f9ff51d
@ -1,18 +1,19 @@
|
|||||||
#!/snap/bin/powershell
|
#!/snap/bin/powershell
|
||||||
#
|
#
|
||||||
|
# Syntax: train_dns_cache
|
||||||
# Description: trains the DNS cache with frequently used domain names
|
# Description: trains the DNS cache with frequently used domain names
|
||||||
# Author: Markus Fleschutz
|
# Author: Markus Fleschutz
|
||||||
# Source: github.com/fleschutz/PowerShell
|
# Source: github.com/fleschutz/PowerShell
|
||||||
# License: CC0
|
# License: CC0
|
||||||
#
|
#
|
||||||
$DomainTable = import-csv domain_table.csv
|
$Table = import-csv domain_table.csv
|
||||||
|
|
||||||
foreach($Row in $DomainTable) {
|
foreach($Row in $Table) {
|
||||||
$DomainName = $Row.Domain
|
$Domain = $Row.Domain
|
||||||
write-progress "Training DNS cache with $DomainName ..."
|
write-progress "Training DNS cache with $Domain ..."
|
||||||
$Ignore = Resolve-DnsName -Name $DomainName -DnsOnly
|
$Ignore = nslookup $Domain
|
||||||
}
|
}
|
||||||
|
|
||||||
$Count = $DomainTable.Length
|
$Count = $Table.Length
|
||||||
write-host "OK - trained DNS cache with $Count domain names from domain_table.csv"
|
write-host "OK - trained DNS cache with $Count domain names from domain_table.csv"
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user