Powershell equivalent of bash ampersand (&) for forking/running background processes

后端 未结 8 1380
北海茫月
北海茫月 2020-11-28 20:33

In bash the ampersand (&) can be used to run a command in the background and return interactive control to the user before the command has finished running. Is there an

8条回答
  •  执笔经年
    2020-11-28 21:17

    Seems that the script block passed to Start-Job is not executed with the same current directory as the Start-Job command, so make sure to specify fully qualified path if needed.

    For example:

    Start-Job { C:\absolute\path\to\command.exe --afileparameter C:\absolute\path\to\file.txt }
    

提交回复
热议问题