Running 32Bit PowerShell Jobs
Monday, February 10, 2014 at 12:00PM
Kieran Jacobsen in Coding, powershell, tip

Occasionally, you might need to run something in PowerShell that needs to strictly be run under a 32bit session. This can be very annoying, here is a trick, use the PowerShell jobs to your advantage!

Start-Job -Name 32bitjobs -RunAs32 -ScriptBlock {  <CODE HERE> }

Receive-Job -Name 32bitjobs

 

This will start the script blog as a 32bit PowerShell session. Start-Job actually kicks off a separate PowerShell.exe instance, so make sure everything that script block needs is available.

 

Article originally appeared on Aperture Science (http://kjacobsen.squarespace.com/).
See website for complete article licensing information.