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.
- Backward compatibility
- Check PowerShell version
- Switch to PowerShell 2.0
- PowerShell 32-bit vs. 64-bit
- PowerShell and Windows versions
- PowerShell Core, PowerShell 7 supported operating systems
- FAQ: Windows PowerShell vs. PowerShell Core
- Download Windows PowerShell
- Download PowerShell 7
- New features in PowerShell 7, PowerShell 7.1 and 7.2
- Poll: How reliable are ChatGPT and Bing Chat? - Tue, May 23 2023
- Pip install Boto3 - Thu, Mar 24 2022
- Install Boto3 (AWS SDK for Python) in Visual Studio Code (VS Code) on Windows - Wed, Feb 23 2022
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.
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.
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 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.
* 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
OS | Windows PowerShell 5.1 | PowerShell Core 6.0 | PowerShell Core 6.1 | PowerShell 7 |
Windows | Windows 7 SP1
Windows 8.1 Windows 10 Windows Server 2008 R2 SP1+ Windows Server 2012 Windows Server 2012 R2 Windows Server 2019 Windows Server 2022 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 11 Windows Server 2008 R2 SP1+ Windows Server 2012 Windows Server 2012 R2 Windows Server 2016 Windows Server 2019 Windows Server 2022 |
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 Windows Server 2022 |
macOS | - | 10.12+ | 10.12+ | 10.13+ |
Red Hat Enterprise Linux | - | 7 | 7 | 7 |
CentOS | - | 7 | 7 | 7 |
Oracle Linux | - | 7 | - | - |
Fedora | - | 25, 26 | 27, 28 | 29+ |
Debian | - | 8.7+, 9 | 8.7+, 9 | 9+ |
Ubuntu | - | 14.04, 16.04, 17.04 18, 17 | 18.10 | 16.04+ |
openSUSE | - | 42.2+ | 42.2+ | 15+ |
Arch Linux | - | N/A | N/A | N/A |
Kali | - | N/A | N/A | N/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
get-verb does work on 5.1
98 verbs
You are right! I corrected the text. Thanks a lot for the hint!
By the way, you could have just edited the doc. 😉
WMF 5.1 With PowerShell 5.1 is supported on Win Server 2008 R2 SP1 With .Net 4.5 or above.
https://www.microsoft.com/en-us/download/details.aspx?id=54616
Supported Operating System
Windows 7 Service Pack 1, Windows 8.1, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2
John, thanks! I added Windows Server 2008 R2 SP1 to the table.
Very helpful blog post, thanks. Could you also add info about the used .NET version?
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.
@luke thanks for adding information about PowerShell Core 6.1 to the wiki. You received 20 member points.
@luke thanks for adding information about WindowsCompatibility for PowerShell Core to the wiki! You received 20 member points.
Any planned update with the early release of PS v7? I have played with it a little bit but not enough to fully grasp how like Win PS v5.1 it is in reality.
I plan to update the doc once the final is released. I guess Microsoft is still fighting with compatibility. Some modules probably won't at the moment.
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
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
I suppose you already verified that you can reach those remote machine through the network by other means. Did you enable PowerShell remoting on the remote system?
Hi Scott Baxter, I think your issue is best discussed in the PowerShell Forum.
https://4sysops.com/groups/powershell/forum/
Did you try ?
got it. I'll check there
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.
found it here web.archive.org/web/20180208235839/https://www.microsoft.com/en-us/download/confirmation.aspx?id=9864
I updated the wiki doc with information about PowerShell 7. If you find outdated information in this text, please let me know.
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.
PowerShell 5.1 is supported (installed by default) on Windows Server 2019.
Thanks! I updated the tables.
Isn’t it amazing that Microsoft still has to ship that old PowerShell version that was released more than five years ago? I think that shows that everything that came afterwards was a big failure. Someone in Redmond must have become megalomaniac to believe that Microsoft can establish a new scripting language on other operating systems than Windows.
True! Most of their new development and innovation is focused towards generating more revenue than what customers are actually expecting.