I am facing problem in running Psexec from teamcity. I tried the following ways but none of them worked.
- Use command line as build runner and in command wrote psexec \\machine cmd /c "echo. | powershell dir *.txt"
- Put the above command in a batch file and tried running it using command line build runner
- Search on teamcity forums, applied the redirection trick: psexe \\machinename cmd /c "echo .| powershell dir *.txt" < nul 1>stdout.txtx 2>stderr.txt
All the above commands work well from my machine but doesn't work with teamcity. the build hangs after connecting to the machine. Is there any other alternatives to run remote scripts from teamcity that works well with teamcity. I tried romcom.exe but even that doesn't seem to work.
Any help or suggestion would be highly appreciated.