How to get PowerShell to wait for Invoke-Item completion?

后端 未结 4 2172
萌比男神i
萌比男神i 2021-02-18 22:49

How do I get PowerShell to wait until the Invoke-Item call has finished? I\'m invoking a non-executable item, so I need to use Invoke-Item to open it.

4条回答
  •  孤城傲影
    2021-02-18 23:46

    Just use Start-Process -wait, for example Start-Process -wait c:\image.jpg. That should work in the same way as the one by @JaredPar.

提交回复
热议问题