When should you measure performance?
Documentation: Microsoft Learn
Measure-Command answers 'how slow' — check you know when measuring matters.
Overview
QUIZ
Core PowerShell · Question 5 of 12
Explanation
Before optimization and again after the change so you can prove the result.
Apply the reasoning
Measure a representative baseline before changing the script, then repeat the same workload after the change. Compare output correctness as well as elapsed time. Use multiple runs when caching, network latency or service throttling could dominate a single observation.
Why the other choices fail
Measuring only afterward gives no baseline for improvement. A script can succeed and still waste time or resources. Display rendering is only one part of execution and should not be substituted for end-to-end timing. Keep input size, account and environment comparable, and decide whether warm-cache or cold-start behavior matches the production task.
Review the prerequisite
Read this first:
Primary documentation
Choose your answer
Choose one answer to see feedback.