Working on a script to compare two lists of computer names (plus some other stuff) I wasn’t happy with the performance I was getting from my first try. I started to experiment but needed to measure the time the scripts took. Enter Measure-Command.
Output is a timespan object that gives the total execution time of the script block. It doesn’t have to be a full script – any valid script block will work. Normally I don’t worry too much about performance but in this case it just felt the approach was too slow.
Keep Measure-Command in mind for during your testing