mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-23 05:01:37 +01:00
Updated train-dns-cache.ps1
This commit is contained in:
parent
57defe3ffe
commit
f12aaf0575
@ -12,14 +12,14 @@ try {
|
||||
$Table = import-csv domain_table.csv
|
||||
foreach($Row in $Table) {
|
||||
$Domain = $Row.Domain
|
||||
write-progress "Training DNS cache with $Domain..."
|
||||
Write-Progress "Training DNS cache with $Domain..."
|
||||
$Ignore = nslookup $Domain
|
||||
}
|
||||
|
||||
$Count = $Table.Length
|
||||
$StopTime = Get-Date
|
||||
$TimeInterval = New-Timespan -start $StartTime -end $StopTime
|
||||
write-host "OK - DNS cache trained with $Count domain names in $TimeInterval sec."
|
||||
Write-Output "OK - DNS cache trained with $Count domain names in $TimeInterval seconds"
|
||||
exit 0
|
||||
} catch {
|
||||
Write-Error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Loading…
Reference in New Issue
Block a user