简体   繁体   中英

how to run agent's command line or powershell using azure pipleine?

is there any way that i can invoke the command line of Azure Deployment agent? The tasks currently available don't invoke the agents' command line, but in fact install their own.

1.Make sure your .bat file itself is free of errors.

2.Use the following command in powershell in your pipeline

    Start-Process "<the path of cmd.exe on our host agent>" -ArgumentList "/k <the target .bat file on your host agent>"

The function of this command line is to open the cmd on your host agent then run the .bat file. You can refer to this link to learn how does it work

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/start-process?view=powershell-6

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM