Reputation: 31
I'm trying to run a PowerShell script using the Jenkins PowerShell plugin and the script produces the following error:
"ERROR: The target system must be running a 32 bit OS"
The slave runs on a Windows 2008 R2 Server and the script runs well locally and remotely from my Windows 7/x64 desktop but it won't run through the plugin.
I also tried to run it using a Windows batch command plugin and that wouldn't work either - same error message.
I narrowed the issue and found the line that produces the error:
$results = openfiles /query /fo csv | Select-String $versionPath
It looks like the OPENFILES command causes the problem and i think it is because Jenkins starts the x86 version of PowerShell but i'm not sure what needs to be done so it will run on the right CPU architecture.
Any help will be appreciated.
Upvotes: 1
Views: 1682
Reputation: 31
Like i thought, Jenkins is running the jobs using the x86 versions of CMD and PowerShell. To get them running using their x64 versions i had to run the slave with the x64 version of Java.
The following solution came much later but that's the best way to go:
Upvotes: 2