This article gives an overview of the Windows versions (including 32-bit and 64-bit editions) and their corresponding PowerShell versions, explains how you can determine the PowerShell version on a Windows computer, and talks about compatibility and installation requirements.

Michael Pietroforte

Michael Pietroforte is the founder and editor of 4sysops. He is a Microsoft Most Valuable Professional (MVP) with more than 30 years of experience in IT management and system administration.

Update: Please view the updated version of this article: Differences between PowerShell versions

PowerShell is almost eight years old, and five different PowerShell versions are currently available. Things are getting complicated if you have to ensure that your PowerShell scripts run properly on the different Windows versions in your network.

PowerShell 2.0 and PowerShell 3.0 were major releases, with many new important features. PowerShell 4.0 was only released one year after PowerShell 3.0. Thus, we couldn’t expect too many enhancements. Its main new feature is Desired State Configuration (DSC), a new platform for managing Windows services and their environment.

As with Windows, the PowerShell release cycles have shortened. Every new Windows version requires a new PowerShell version. PowerShell 5.0 is not different here. OneGet, a Chocolatey's repository-based package management system (apt-get for Windows), and better management of layer 2 network switches are the most important new features. I suppose PowerShell 5.0 will be integrated into Windows 9. For a good feature comparison of the different PowerShell versions, please have a look at this Wikipedia article.

PowerShell and Windows versions ^

The following table gives you an overview of the PowerShell versions and how they correlate to the different Windows versions. The Default Windows Versions column tells you the PowerShell version that was delivered with the corresponding Windows version. The links in the Available Windows Versions column allow you to download the PowerShell version for the corresponding Windows version. Note that PowerShell is part of the Windows Management Framework which also includes Windows PowerShell Web Services, Windows Remote Management (WinRM), Windows Management Instrumentation (WMI), and the Server Manager WMI provider.

The information for older PowerShell versions is somewhat hard to come by, and I stumbled upon contradictions. Please let me know if you spot an error or if you think something is missing.

PowerShell VersionRelease DateDefault Windows VersionsAvailable Windows Versions
PowerShell 1.0November 2006Windows Server 2008 (*)Windows XP SP2
Windows XP SP3
Windows Server 2003 SP1
Windows Server 2003 SP2
Windows Server 2003 R2
Windows Vista
Windows Vista SP2
PowerShell 2.0October 2009Windows 7
Windows Server 2008 R2 (**)
Windows XP SP3
Windows Server 2003 SP2
Windows Vista SP1
Windows Vista SP2
Windows Server 2008 SP1
Windows Server 2008 SP2
PowerShell 3.0September 2012Windows 8
Windows Server 2012
Windows 7 SP1
Windows Server 2008 SP2
Windows Server 2008 R2 SP1
PowerShell 4.0October 2013Windows 8.1
Windows Server 2012 R2
Windows 7 SP1
Windows Server 2008 R2 SP1
Windows Server 2012
PowerShell 5.0April 2014 (***)Windows 10Windows 8.1
Windows Server 2012 R2

* Has to be installed through Server Manager
** Also integrated in all later Windows versions
*** Release date of public review

PowerShell 4.0 and Windows 8 ^

When I created the table, I was quite surprised that PowerShell 4.0 isn’t available for Windows 8. The only way to get PowerShell 4.0 for Windows 8 is to upgrade to Windows 8.1. It is probably not a big deal for most environments because the new features for PowerShell 4.0 are mostly of interest for Windows Server 2012 and Windows Server 2012 R2.

Backward compatibility ^

PowerShell 3.0 and 4.0 are backward compatible with PowerShell 2.0, and PowerShell 4.0 is backward compatible with 3.0. Thus, it makes sense to update all machines in your network to the latest PowerShell version. If you use features in a script of a newer PowerShell on an outdated system, your script will fail. You can easily deploy PowerShell with Group Policy.

Check PowerShell version ^

If you want to know what PowerShell version you are using, you can run the $PSVersionTable command.

If you are overwhelmed by all these version numbers, you can also display only the PowerShell version with $PSVersionTable.PSVersion.

And, if this is still too much overhead for your taste, you can use the Get-Host cmdlet.

Switch to PowerShell 2.0 ^

PowerShell 2.0 is integrated in all Windows versions since Windows 7 and Windows Server 2008 R2. If you want to ensure that a PowerShell script also works properly on a system with PowerShell 2.0, you can switch to a PowerShell 2.0 prompt on every Windows version after Windows 7 with PowerShell.exe -Version 2. However, this will only work if you installed .NET Framework 2.0. Without .NET 2.0 you will get the error message:  PowerShell.exe :

On Windows 8 and Windows 8.1 you can just enable the Windows Feature .NET Framework 3.5 in the Control Panel (Programs) because it includes .NET 2.0.

This doesn’t work in PowerShell ISE. However, you can run scripts or cmdlets in PowerShell ISE using PowerShell 2.0, like this:

Since -IncludeUserName was introduced with PowerShell 4.0, you will get an error message telling you that a parameter cannot be found; however, if you run the above command without parameters, a list of the running processes will be displayed. Note that -IncludeUserName requires an elevated PowerShell prompt.

PowerShell -Version 2

PowerShell -Version 2

PowerShell 32-bit vs. 64-bit ^

On a Windows 64-bit edition, you will find a 32-bit and a 64-bit version of PowerShell for backward compatibility purposes. If you type “PowerShell” on a Windows Start Screen, you will see “x86” behind the 32-bit versions of PowerShell and PowerShell ISE. (If PowerShell ISE doesn’t appear, read this.)

PowerShell (x86)

PowerShell (x86)

By and large, the 64-bit and 32-bit PowerShell versions are compatible, and you shouldn’t notice much of a difference. Problems can arise if binaries are involved. For instance, if you want to extend PowerShell with snap-ins (compiled cmdlets), you have to ensure that you download the correct version. You can also run into problems if you want to instantiate an object of a 32-bit application (Microsoft Office, for example) with the 64-bit version of PowerShell.

You can check whether you are in 32-bit or 64-bit shell with [Environment]::Is64BitProcess. If you are running PowerShell 64-bit, you will receive True as output; otherwise, you’ll receive False.

PowerShell Process 32-bit or 64-bit

PowerShell 32-bit or 64-bit?

Install requirements ^

If you still have Windows XP, Windows Vista, and Windows Server 2003 systems in your network, you can only run PowerShell 2.0 on them. On Windows 7 or higher, I recommend installing PowerShell 4.0 even if you don’t need the new features. If, for some reason, you still want to deploy PowerShell 3.0, you should have at least .NET Framework 4.0 installed; .NET Framework 4.5 or 4.5.2 works as well. Windows 8 and Windows Server 2012 already come with .NET 4.0. PowerShell 4.0 requires at least .NET 4.5.

Overwrite behavior ^

If you install a newer PowerShell version on a PowerShell 1.0 system, PowerShell 1.0 will always be replaced. In contrast, updating a PowerShell 2.0 system with PowerShell 3.0 or 4.0 will leave version 2.0 on the system. However, if you install version 4.0 on a PowerShell 3.0 system, version 3.0 will be removed.

Update: Please view the updated version of this article: Differences between PowerShell versions

Win the monthly 4sysops member prize for IT pros

Share
0

Related Posts

22 Comments
  1. Allan 2 years ago

    Is it possible to run Powershell 5 in Windows 8.1 Home?

    1+

  2. Author
    Michael Pietroforte 2 years ago

    Windows 8.1 Home is not listed under the requirements for the Windows Management Framework 5.0. However, PowerShell 5 is available on Windows 10 Home. How about upgrading to Windows 10 for free?

    1+

  3. Allan 2 years ago

    Thanks, but no thanks. I agreed with most of what you said about Windows 10 in another article.
    I may look at Windows 10 Pro after Redstone.
    Thanks for your quick reply.

    0

  4. Allan 2 years ago

    Michael:

    I want to tell you that I was able to obtain Windows Management Framework 5.0 for Windows 8.1 Home through Windows Update.  So far, no problems.  Now I can learn Windows Powershell 5.

    I am working through your tutorials as much as possible.

    0

  5. TJ 2 years ago

    Will it be a problem to run version 4.0 on my workstation to automate a server and active directory, that are only running 2.0?

    0

    • Author
      Michael Pietroforte 2 years ago

      Nobody can I tell you in advance if moving to a new version will cause problems. However, since PowerShell 2.0 will still be available after you install 4.0 you can always switch back easily if problems come up. I explained in the article how you can switch between PowerShell versions.

      0

  6. Jon 2 years ago

    Is there a way to tell what version of PowerShell a command is associated with, from PowerShell? Such as New-NetIPAddress = 4.0. Or list PowerShell 2.0/3.0/4.0 commands by version from a Windows 10 machine that has 5.0?

    0

    • Author
      Michael Pietroforte 2 years ago

      Jon, do you mean with "associated with" the PowerShell version that introduced the cmdlet? I guess you want to know whether a cmdlet is available in a certain PowerShell version or not? You can a get a list of cmdlets for the different PowerShell versions here (click on other versions at the top).

      0

  7. Jon 2 years ago

    Thank you for replying Michael
    That is the information I want to know, but was wondering if there was a way directly from PowerShell, instead of having to go to TechNet or a web browser.

    0

  8. ScoR66 1 year ago

    Hi there ,

     

    why is it possible that Powershell 2.0 ISE is not funktional as Powershell 2.0 from the same instalation KB Package , under XP  ?

    0

  9. Vish K 12 months ago

    Hi,

    Does windows 10 have PowerShell installed by default?

    0

    • Author
      Michael Pietroforte 12 months ago

      Yes, PowerShell is part of Windows 10. I don't think that you can uninstall it.

      0

  10. JA 4 months ago

    I am migrating DHCP server from 2008 R2 to 2012 R2 following Microsoft KB.

    Before going to production environment, I have set up a test one but failing to import svrmig.mig file as it says on 2012 R2 that the versions of Windows Server Migration Tools on the source and destination servers are not the same.

    The only difference I can see is the PowerShell BuildVersion. On 2008 R2 it is 6.3.9600.16406 and on 2012 R2 it is 6.3.9600.17400

    1+

  11. Nightkiller 3 months ago

    JA: Do you know about this tool :

    https://github.com/janegilring/PSVersion

    will provide you with a friendly name to narrow down the version differences

    0

  12. Eddie Kumar 3 months ago

    Very useful info, thanks you, however there is one conflict - I have "Windows Server 2012 R2" installed which has PowerShell 4.0 pre-installed by default (as opposed to PS 5.0 - as your table shows).

    0

    • Author
      Michael Pietroforte 3 months ago

      The table is correct and PowerShell 4 is indeed the default version for Windows Server 2012 R2.

      2+

      • Eddie Kumar 3 months ago

        Hi Michael, thanks for the quick response. I double checked it, I certainly have PowerShell-4.0 on my "R2" box. Could it be because when it was upgraded from WinServer2012 to WinServer2012-R2, we didn't install certain patches or so? thanks.

        Here is what I'm getting:

        PS Z:\> SystemInfo /fo csv | ConvertFrom-Csv | select OS*

        OS Name : Microsoft Windows Server 2012 R2 Datacenter
        OS Version : 6.3.9600 N/A Build 9600
        OS Manufacturer : Microsoft Corporation
        OS Configuration : Member Server
        OS Build Type : Multiprocessor Free

        ------------------

        PS Z:\> $PSVersionTable

        Name Value
        ---- -----
        PSVersion 4.0
        WSManStackVersion 3.0
        SerializationVersion 1.1.0.1
        CLRVersion 4.0.30319.42000
        BuildVersion 6.3.9600.18773
        PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
        PSRemotingProtocolVersion 2.2

         

        1+

        • Author
          Michael Pietroforte 3 months ago

          Eddie, you misunderstood my comment. The table shows exactly what you say: Windows 2012 R2 is delivered with PowerShell 4. Please check the table.

          1+

  13. Eddie Kumar 3 months ago

    Hi Michael, thanks for clarification, it makes sense now. Thx.

    1+

  14. Rick Dexter 18 hours ago

    Powershell 5 now is out for Win 7, 8, 10, 2012, 2012R2

    0

    • Author
      Michael Pietroforte 15 hours ago

      Rick, I no longer update this blog post. The updated version is now in the wiki. Still need to add PowerShell Core, though.

      0

Leave a reply

Your email address will not be published. Required fields are marked *

*

CONTACT US

Please ask IT administration questions in the forum. Any other messages are welcome.

Sending
© 4sysops 2006 - 2018

Log in with your credentials

or    

Forgot your details?

Create Account