如何在发生某些外部事件之前暂停Powershell脚本?

Cha*_*son 4 powershell powershell-1.0

我正在使用Powershell 1脚本启动Python程序,然后我想暂停Powershell直到Python完成其工作.(我完全拥有Python文件.)最好的方法是什么?

Kei*_*ill 6

查看Wait-Process cmdlet上的帮助:

man Wait-Process -full
start-process notepad -PassThru | Wait-Process
Run Code Online (Sandbox Code Playgroud)