I have a strange issue where TeamCity just hangs whenever i try to do a remote call to one of our test servers.
Currently the build steps are:
- Template files for
- Compile code in
- Package project
- Send package to test servers
- Unzip package on test servers
Now it all works fine up until the last stage, unzipping the package on the remote server. Now I wanted to just run a powershell command to connect up and run the commands then exit. This all works fine if I were using powershell from remote desktop, and the user credentials provided are correct.
An example of what is being run is below:
$password = ConvertTo-SecureString "%PasswordVar%" -AsPlainText -Force
$credentials = New-Object System.Manager.Automation.PsCredential("%UsernameVar%", $password)
etsn -computername %TestServer1Var% -Credential $credentials
When this is called TeamCity just hangs, it has to be manually stopped or it will stay on this step on the agent forever. I have tried not using credentials, I have tried not using etsn and using the full command name, also tried other remote command methods, nothing seems to work.
So is there a way to get TeamCity to actually run the commands? or find out what is causing it to process this step indefinately?
AllowRedirection
parameter settings? This will cause your script to log details of the command run that you would see in an interactive console.