I'm trying to deploy a package (install a few exes, copy files, and start a windows service) to a windows server. What's the best tool to do this? In general there are batch scripts on the test and prod servers that do everything I need. How do I run them remotely from a bamboo job?
When I was working on linux servers, I just used ssh and it worked great. But I'm working with windows servers now. I found PsExec.exe which actually does what I'm looking for on a command line. But if I run it inside a bamboo job, it just hangs.
I see the following:
---
29-Jan-2012 12:49:10Beginning to execute external process for build 'MyBuild - Default Job'
... running command line:
C:\Tools\PsExec.exe
\\myServer
-u
myDomain\myAdminUser
-p
password
ipconfig
... in: C:\bamboo-home\xml-data\build-dir\JOB-NAME\MySubfolder
29-Jan-2012 12:49:10
29-Jan-2012 12:44:48PsExec v1.98 - Execute processes remotely
29-Jan-2012 12:44:48Copyright (C) 2001-2010 Mark Russinovich
29-Jan-2012 12:44:48Sysinternals - www.sysinternals.com
hangs....
---
I had a similar problem with Powershell and solved it by adding <NUL to the end of the command, which worked great even in a Bamboo job.
So in short, what's the best way to execute a remote command within a Bamboo job? If PsExec, how do I get it to not hang?
Thansk!!