【问题标题】:Run powershell command as a background在后台运行 powershell 命令
【发布时间】:2021-06-19 21:09:25
【问题描述】:

我需要触发 TFS 构建运行命令作为后台进程。我如何在 Powershell 中做到这一点?我曾尝试使用 Start-Job 命令,但它不起作用。需要你的帮助。

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TFSBuild.exe start  /collection:"https://test.tfs.siemens.net/test" /builddefinition:"Test\Test.build"

【问题讨论】:

    标签: tfs tfsbuild


    【解决方案1】:

    使用start-process 命令启动脚本。这将确保启动的作业在任务完成后继续运行。但构建完成后,作业将关闭。

    Start-Process powershell.exe -ArgumentList '-file xxxx.ps1'
    

    【讨论】:

      猜你喜欢
      • 2021-12-22
      • 2022-11-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多