Can command line runner execute powershell x64? (it defaults to x86)
Hi, I have a teamcity build agent runing on a sharepoint server to deploy my sharepoint application. I noticed the buildagent runs as an x86 process even on win 2008 r2 x64.
In a command line runner build step, I want execute a powershell script to deploy my site. This script works fine on the machine at a command prompt, and I use a batch to run my powershell script like I have many times before in teamcity.
This script loads some Microsoft snap ins that need to be run in powershell x64, but I noticed the buildrunner runs cmd /c and since its x86 it runs the x86 powershell causing this error:
1 ERRORS: No snap-ins have been registered for Windows PowerShell version 2.
Process exited with code 1
Process exited with code 1
Is there any way to get the build runner to run a x64 command runner or powershell instance?
Please sign in to leave a comment.
Hi Bonnie
You need to run the process by this command: c:\windows\sysnative\windowspowershell\v1.0\powershell.exe
Michael
Thanks, Michael, that works!
This post in the following explains why changing to sysnative will work(which supresses WOW64 file system redirection), http://www.nynaeve.net/?p=133
Thanks