July 13th, 2015

PowerTip: Use Cmdlet to Trace Script Execution

Doctor Scripto
Scripter

Summary: Use a Windows PowerShell cmdlet to trace script execution.

Hey, Scripting Guy! Question How can I trace lines that execute in a Windows PowerShell script, without concern for variable assignments, functions, or external scripts?

Hey, Scripting Guy! Answer Use the Set-PSDebug cmdlet and set a trace level of 1:

Set-PSDebug -trace 1

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.

Feedback