Improved both scripts

This commit is contained in:
Markus Fleschutz
2021-03-29 17:09:59 +02:00
parent c297f70046
commit b4ba271ff2
2 changed files with 5 additions and 4 deletions

View File

@ -21,7 +21,8 @@ try {
$Count = $Table.Length
$StopTime = Get-Date
$TimeInterval = New-Timespan -start $StartTime -end $StopTime
write-host -foregroundColor green "OK - resolved $Count domain names in $($TimeInterval.seconds) seconds"
$Average = [math]::round($Count / $TimeInterval.seconds, 1)
write-host -foregroundColor green "OK - $Average domains/s ($Count domains resolved in $($TimeInterval.seconds) seconds)"
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"