PowerShell’s Docs General PowerShell Docs Differences between PowerShell versions

This article covers the differences between the PowerShell versions on different Windows versions. In a new section below, we discuss the differences of Windows PowerShell and PowerShell Core 6. In this article "Windows PowerShell" refers to the PowerShell versions that run on Windows until version 5.1. PowerShell Core or PowerShell 6 refers to the new cross-platform edition of PowerShell.

Please edit this document if you spot an error or if you want to add information.

Backward compatibility ^

Windows PowerShell is backward compatible with previous versions of Windows PowerShell. Thus, it makes sense to update all machines in your network to the latest Windows PowerShell version. If you use features in a script of a newer PowerShell version on an outdated system, your script will fail. You can easily deploy PowerShell with Group Policy. Note that PowerShell 7 is not fully backward compatible with Windows PowerShell. For more information read PowerShell v5 vs. PowerShell v7—Which to use and when

The Windows PowerShell Compatibility Pack is already available in the PowerShell Gallery. It allows you to import existing modules in PowerShell 6.x and use them like if you are in a PowerShell for Windows console. However, you must be aware that this works fine with a lot of modules but not with all of them. It's up to you to try which modules can be used with this method or not.

To download and install the module on a computer

Install-Module -Name WindowsCompatibility -Repository PSGallery

After that, you just have to import the WindowsCompatibility module once per session and use the Import-WinModule cmdlet for every non-compatible module you want to run on PowerShell 6.x

PS C:\> Import-Module -Name WindowsCompatibility
PS C:\> Import-WinModule -Name MyModuleWhichIsNotCompatible
PS C:\>

Check PowerShell version ^

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

PS C:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.15063.674
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.15063.674
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1


PS C:\>

This also works with PowerShell Core on different operating systems.

PowerShell Core on macOS runs on Darwin

PowerShell Core on macOS runs on Darwin

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 / 3.5.

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.

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 and Windows versions ^

The following table gives you an overview of the Windows PowerShell versions and how they correlate to the different Windows versions. The Default Windows Versions column tells you the Windows PowerShell version that was delivered with the corresponding Windows version. The links in the Available Windows Versions column allow you to download the Windows PowerShell version for the corresponding Windows version. Note that Windows 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.

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.0February 2016Windows 10Windows 7 SP1
Windows 8.1
Windows Server 2012
Windows Server 2012 R2
PowerShell 5.1January 2017Windows 10 Anniversary Update
Windows Server 2016
Windows 7 SP1
Windows 8.1
Windows Server 2008 R2 SP1
Windows Server 2012
Windows Server 2012 R2
PowerShell Core 6January 2018N/AWindows 7 SP1
Windows 8.1
Windows Server 2008 R2 SP1
Windows Server 2012
Windows Server 2012 R2
PowerShell 7March 2020N/AWindows 7 SP1
Windows 8.1
Windows Server 2008 R2 SP1
Windows Server 2012
Windows Server 2012 R2

* Has to be installed through Server Manager
** Also integrated in all later Windows versions

PowerShell Core is the successor of Windows PowerShell 5.1 and runs on Windows, Linux and macOS. The table below lists all supported operating systems and the FAQ at the end of this article answers important questions about the difference between Windows PowerShell and PowerShell Core.

PowerShell Core, PowerShell 7 supported operating systems ^

OSWindows PowerShell 5.1PowerShell Core 6.0PowerShell Core 6.1PowerShell 7
WindowsWindows 7 SP1

Windows 8.1

Windows 10

Windows Server 2008 R2 SP1+

Windows Server 2012

Windows Server 2012 R2

Windows Server 2016

Windows 7 SP1

Windows 8.1

Windows 10

Windows Server 2008 R2 SP1+

Windows Server 2012

Windows Server 2012 R2

Windows Server 2016

Windows 7 SP1

Windows 8.1

Windows 10 1607+

Windows Server 2008 R2 SP1+

Windows Server 2012

Windows Server 2012 R2

Windows Server 2016

Windows Server 2019

Windows 7 SP1

Windows 8.1

Windows 10

Windows Server 2008 R2 SP1+

Windows Server 2012

Windows Server 2012 R2

Windows Server 2016

Windows Server 2019

macOS-10.12+10.12+10.13+
Red Hat Enterprise Linux-777
CentOS-777
Oracle Linux-7--
Fedora-25, 2627, 2829+
Debian-8.7+, 98.7+, 99+
Ubuntu-14.04, 16.04, 17.04 18, 1718.1016.04+
openSUSE-42.2+42.2+15+
Arch Linux-N/AN/AN/A
Kali-N/AN/AN/A
Raspbian-N/A(ARM32)N/A
Alpine--(experimental Docker image coming soon)3.8+

FAQ: Windows PowerShell vs. PowerShell Core ^

Does Windows PowerShell have a future?

No, the future belongs to PowerShell Core. As things stand now, Microsoft will only provide bug fixes and security updates for Windows PowerShell. Only PowerShell Core will receive feature updates.

Should I still work with Windows PowerShell or switch to PowerShell 7 now?

This depends on your environment. If all of your systems have PowerShell 7  installed, you might consider moving now. However, PowerShell 7 still has compatibility issues with some modules. Thus, you should have to make sure first that all required modules are available. For more information read this article:

PowerShell v5 vs. PowerShell v7—Which to use and when

Can I run Windows PowerShell and PowerShell 7 on the same Windows computer?

Yes

Can I use PowerShell ISE with PowerShell Core?

No, use Visual Studio Code instead for PowerShell Core.

Will all of my old Windows PowerShell scripts work on PowerShell Core, that is, is PowerShell 7 backward compatible with Windows PowerShell?

Previous PowerShell updates were fully backward compatible. This only applies partly to PowerShell 7. Because PowerShell 7 is a cross-platform edition of PowerShell, Microsoft made a few compromises. This means you have to test each and every Windows PowerShell script to make sure it also works on PowerShell 7.

Will all scripts I write for PowerShell 7 run on all supported platforms?

Basic scripts will run on all platforms. However, considering the huge differences between the supported platforms, you have to test each script on all platforms it is supposed to run on.

Do all modules for Windows PowerShell run on PowerShell 7?

No, many complex modules have to be adapted for PowerShell 7. In some cases, different module versions exist for both PowerShell editions.

Why can't I launch PowerShell 7 with powershell.exe on a Windows computer?

This is because PowerShell Core and Windows PowerShell have to coexist on Windows computers. You can start PowerShell Core with the pwsh command.

I can't find the official documentation for PowerShell 7. Where is it?

Microsoft has merged the Windows PowerShell documentation with the PowerShell 7 documentation.
You can find it here.

I have an unanswered question about the differences between PowerShell 7 and Windows PowerShell. Where can I ask it?

Ask in the PowerShell forum.

Should I extend this FAQ by editing this wiki doc?

Definitely, yes!

Download Windows PowerShell ^

Windows PowerShell is part of the Windows Management Framework. Below all the download links of the different Windows PowerShell versions. To test your script on PowerShell 2.0, please the corresponding section above.

PowerShell 3.0 - Windows Management Framework 3.0

PowerShell 4.0 - (Windows Management Framework 4.0

PowerShell 5.0 - Windows Management Framework 5.0

PowerShell 5.1 - Windows Management Framework 5.1

Download PowerShell 7 ^

You can download PowerShell for every operating system here.

New features in PowerShell 7, PowerShell 7.1 and 7.2 ^

Please read the articles below for more information about the new features in PowerShell 7, PowerShell 7.1 and PowerShell 7.2

Top 10 new features of PowerShell 7

PowerShell v5 vs. PowerShell v7—Which to use and when

How to install PowerShell 7 on Windows and Linux

New features in PowerShell 7.1

How to install and upgrade to PowerShell 7.1

PowerShell 7.2: New features in the Preview

avataravataravataravataravataravatar

Discussion (19)

    • Matthis, thanks! The thing with the .NET version is complicated because every Windows 10 version comes with a new .NET version. Thus, since the release of Windows 10, Microsoft released 6 .NET versions, but only one Windows PowerShell version. And now with .NET Core and PowerShell Core things are getting even more complicated. If you want to know how the .NET versions correspond to Windows versions, I recommend this Wikipedia article.

  1. Struggling with remoting.  Server 1 has PS5.1 installed, and I can create a session to other 5.1 systems.

    However, I have some servers out there with PS2.0, and I am unable to create a session.

    I have double checked the remote computer name.

    I have verified the credentials are in the remote Administrator group.

    I have verified network connection between the two servers.

    but I am still getting errors with the following command

    $session = New-PSSession -ComputerName $server -Credential $cred

    Connecting to remote server <serserver2> failed with the following error message : WinRM cannot complete the operation. Verify that the specified computer name is valid, that the computer is 
    accessible over the network, and that ….

    Sever2 is Wondows 2008 R2 SP!

    Can a PS 5.1 box remote to a PS2.0 box?

    Thanks

  2. Does anyone know of another location where powershell 2.0 package "Windows Vista SP2" can be downloaded. Microsoft are systematically breaking all the download links for everything made before win 7. 

    I just wanted to play with it on an old vintage PC.

  3. found it here web.archive.org/web/20180208235839/https://www.microsoft.com/en-us/download/confirmation.aspx?id=9864

  4. LOL, our article starts by saying powershell is backward compatible so go ahead and update and then you immediately say that version 7 is not. Sort of destroys the article and author's credibility right out of the gate. 

    • The article claims that Windows PowerShell is backward compatible and this is still correct. As mentioned in the article, Microsoft sacrificed backward compatibly to cross platform support and renamed the language, first to PowerShell Core 6 and then to to PowerShell 7 (without Windows in the name). I highly recommend to read the entire article carefully before you start bashing.

Leave a Reply to JohnM Cancel reply

Please enclose code in pre tags

Your email address will not be published.

© 4sysops 2006 - 2022

CONTACT US

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

Sending

Log in with your credentials

or    

Forgot your details?

Create Account