How can I create a 32-bit remote powershell session (on a 64-bit machine)?

9

3

On a local 64-bit machine, I can open 'PowerShell (x86)'. But if I do 'Enter-PSSession' to another machine running a 64-bit OS, it creates a 64-bit PowerShell.

In my scenario I need a 32-bit PowerShell session. How can I get one?

Jay Bazuzi

Posted 2010-06-26T02:09:42.017

Reputation: 3 780

Answers

14

I found the answer. You have to use the -ConfigurationName parameter, like this:

Enter-PSSession -ComputerName COMPUTERNAME -ConfigurationName Microsoft.PowerShell32

You can get the list of available configurations with:

Get-PSSessionConfiguration

Note that the configurations are specific to the remote machine. In my quick tests, a 32-bit OS only has Microsoft.PowerShell which is 32-bit, while a 64-bit OS has Microsoft-PowerShell for 64-bit and Microsoft-PowerShell32 for 32-bit.

Jay Bazuzi

Posted 2010-06-26T02:09:42.017

Reputation: 3 780

4Additionally, if Microsoft.PowerShell32 is not available on your 64bit machine you can register it using: Register-PSSessionConfiguration Microsoft.PowerShell32 -processorarchitecture x86 -force – Sam Martin – 2014-09-18T08:13:13.520