Summary: Use a Windows PowerShell cmdlet to trace script execution.
How can I trace lines that execute in a Windows PowerShell script, without concern for variable assignments, functions, or external scripts?
Use the Set-PSDebug cmdlet and set a trace level of 1:
Set-PSDebug -trace 1