PowerShell DNS lookup script

Major credit to KMSigma and mrxinu :

This script is designed to do DNS lookups and provide metrics that result from such a query. The significant part here is that this can handle an entire domain's worth of DNS lookups. I didn't see any form of this today after searching the forums. Naturally as it was written by KMSigma, it's well commented and hopefully self explanatory. I'll copy the script in here as well so it can be seen. This will identify the fastest, average, and slowest DNS lookups across all available defined DNS servers.

Example results:

Message.Fastest:(hostname) executes DNS lookup against 'www.solarwinds.com' in 0.2371 ms

Statistic.Fastest:0.2371

Message.Average:Average DNS lookups against 'www.solarwinds.com' takes 10.1321466666667 ms

Statistic.Average:10.1321466666667

Message.Slowest:(hostname) executes DNS lookup against 'www.solarwinds.com' in 147.0255 ms

Statistic.Slowest:147.0255

pastedImage_0.png