Skip to content

Commit 3ef6a9f

Browse files
committed
Add progress bar
1 parent b2101bc commit 3ef6a9f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

route53/dnstest.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ function Iterate-NSLookup {
4040
$responses.Add($ip,1)
4141
Write-Host Resolved unique IP: $ip
4242
}
43+
Write-Progress -Activity "Resolving $hostname" -Status $ip -PercentComplete (($stepcounter++ / $iterations) * 100)
4344
Start-Sleep -seconds $sleeptime
4445
}
4546

@@ -54,6 +55,7 @@ function Iterate-NSLookup {
5455
return $recordlist
5556
}
5657

58+
$stepCounter = 0
5759
$records = Iterate-NSLookup -hostname $hostname -nameserver $nameserver -iterations $iterations -sleeptime $sleeptime
5860
$records | Format-Table -Property ip,count,percent
5961
Write-Host $records.count "unique responses" for $hostname

0 commit comments

Comments
 (0)