I am not familiar with Jenkins, but it looks like this is a 32-bit process.
Can you specify the location of the PowerShell executable? If so, try using this path: C:\Windows\SysNative\WindowsPowerShell\v1.0\powershell.exe
If you cannot do this, you can do this in code in your "execution sequence" using Invoke-Command :
Invoke-Command -ComputerName . -ScriptBlock { [Environment]::Is64BitProcess }
All code in the script block will be run in a separate 64-bit process, and the results will be serialized and returned.
Explanation
Tracks
On 32-bit Windows, the system folder is C:\Windows\System32 . On 64-bit Windows, the 64-bit system folder also has C:\Windows\System32 . But the system folder for 32-bit processes when installing 64-bit Windows is actually C:\Windows\SysWOW64 .
For compatibility, a 32-bit process in a 64-bit OS will have any calls to C:\Windows\System32 transparently redirected to C:\Windows\SysWOW64 , without the knowledge of the process.
To enable a 32-bit process for referencing a real System32 on a 64-bit OS, you can use C:\Windows\SysNative .
Since PowerShell has a 32-bit and a 64-bit version and lives inside system folders, you need to use the above rules to refer to the correct executable, depending on whether you call it from a 64-bit or 32-bit process.
A typical scenario (you want to name the version of the same bitness) is easiest (just call powershell.exe or specify it through System32 ), but it gets hairy if you want to reference another version.
Invoke-Command Method
The Invoke-Command cmdlet allows you to run code, usually on another computer, but you can run it on the same computer. This will trigger a completely separate process, and any output will be serialized and sent back to the calling process.
The caveat to this method is that you must enable PowerShell remoting on the machine using Enable-PSRemoting or Group Policy (shameless startup).
The default profile ( Microsoft.PowerShell ) that you connect to on a 64-bit machine will be the 64-bit version of PowerShell, regardless of the OS of the caller.
By the way, if you want to use Invoke-Command to connect to the 32-bit version, you can do this by explicitly specifying the Microsoft.PowerShell32 profile.