Measure-Command: measure python script execution time

Question:

I found that I can measure execution time on Windows with this command:

and it works great. Unfortunately, when I try to run a script which takes some (positional and optional) arguments, I get an error message, with

I get the error:

Start-Process : A positional parameter cannot be found that accepts argument ‘file.txt’.

Without Measure-Command everything works fine.

What am I doing wrong? How to measure execution time for scripts which take arguments?

Answer:

try

Source:

Measure-Command: measure python script execution time by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply