如题:怎么在 powershell.exe -File “abc.ps1” 之前调用 Set-PSDebug ?
PowerShell -Command "& { Set-PSDebug -Trace 2 ; .\abc.ps1}"
本文链接: https://www.pstips.net/set-ps-debug-before-invoke-scripts.html
请尊重原作者和编辑的辛勤劳动,欢迎转载,并注明出处!
请尊重原作者和编辑的辛勤劳动,欢迎转载,并注明出处!
task 执行ps1脚本,一直执行不成功,手动执行没有问题,program/script:powershell.exe arguments:- File D:testtest.ps1
PowerShell使用全路径试试:C:WindowsSystem32WindowsPowerShellv1.0powershell.exe