PowerShell “echo on”

前端 未结 4 1915
忘掉有多难
忘掉有多难 2020-12-24 01:03

This is a duplicate of https://serverfault.com/questions/102098/powershell-script-showing-commands-run. I thought it would be more appropriate to ask this question here.

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-24 01:26

    Set-PSDebug -Trace 1
    
    • 0: Turn script tracing off.
    • 1: Trace script lines as they run.
    • 2: Trace script lines, variable assignments, function calls, and scripts.

    For more info: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/set-psdebug?view=powershell-6

提交回复
热议问题