teamcity powershell - unable to run batch file

Good morning Team City gurus!

A question for ya'll. Our development team has recently set up TeamCity (version 9.0.2, free) on a CI build server. We have the need to call a .bat executable that resides on the CI build server with specific credentials, using a powershell script, as a teamcity build step.

Unfortunately, we are unable to kick off the .bat file we are targetting. Attempts to diagnose have not proven fruitful. Would someone be willing to help us out with this?

For complete details, please take a look at the stack overflow question we have open for this...

Thank you VERY much for the help!


Comment actions Permalink

Just wanted to 'bump' this thread again.

Also, if this forum is not the best way to go about getting an answer like this, what would ya'll recommend? Is there another way to get this kind of support?


Comment actions Permalink


-Credential and -NoNewWindow options cannot be used together. I don't see any statements in official Microsoft documentation, but here is a good explanation:

The solution is to redirect output to a file, and then print in inside your session:

Also you'll probably need -Wait option to synchronize process execution.


Please sign in to leave a comment.