Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why and when to use 32 or 64-bit PowerShell or ISE?

I just got my first 64-bit Windows notebook. Now I'm looking for information when and why to use the 32 or the 64-bit versions of PowerShell or ISE.

My first impression is that I better stay with 32 bit, until I understand things better.

What I miss or didn't find are basic tutorials and practical experiences and links to this questions.

like image 611
bernd_k Avatar asked Aug 21 '11 10:08

bernd_k


2 Answers

I'am working on a Seven 64Bits and W2K8 R2 for one year now, and, on the command line, I'am always using 64 bits Powershell without any troubles.

For me the problem is not to choose 32 or 64 Bit PowerShell.exe, but to know that the two exists, and that a 32 bits process will use the 32 bits PowerShell. For example if you use PowerShell as post build execution script in Visual Studio 2010, it will use 32 bits PoweShell because Visual Studio 2010 is 32 bits process.

The two versions see two differents places in the registry so you have to Set-ExecutionPolicy for both.

As scripting is concerned I do not use ISE, but PowerGUI script Editor. You can use

[intPtr]::size

in a script to know if you are runing 32 or 64 bits PowerShell.exe.

like image 105
JPBlanc Avatar answered Oct 10 '22 22:10

JPBlanc


You would use the 64 bit versions of PowerShell or PowerShell ISE where the problem you are trying to solve is uniquely 64 bit. For example:

  1. You need your PowerShell script to be able to consume more memory than a 32 bit application will allow

  2. You are consuming libraries that are 64 bit only or need to run in a 64 bit environment. For example on Windows 2008R2/IIS7.5 if you are using the Microsoft.Web.Management managed wrapper, if you need to modify administration.config via this library then your application or script needs to run in a 64 bit process.

like image 22
Kev Avatar answered Oct 10 '22 22:10

Kev