top of page
Writer's pictureTony Fortunato

1 Line Powershell Performance Script

If you want to see a Network person fall under their desk in the fetal position, ask them to write a script.


Scripts can get complicated since you have to learn a programming language only to find out afterwards that you learned the ‘old not cool anymore’ language. Then you have to document the script using comments and flowcharts, etc…


Ok, let me show you a 1 command Powershell performance script that you can write to impress your friends, family and maybe your colleagues. The command is Measure-Command {command}. And here is an example from my video Measure-Command {xcopy 113MB h:\*.* /Y}. Its pretty straightforward, basically Powershell will record how long it takes to complete whatever command you provide. In the previous example, it was a xcopy from my local drive to my network drive.


The best part of this kind of measurement is that it includes the production client, server and network as well as whatever ‘load’ is on all three. In the video I mention that you should take more than one measurement. I take 5, drop the highest, lowest and average the remaining three, but feel free to put your own spin on how you make your calculations.


330 views

Recent Posts

See All
bottom of page