Are you using the most current PowerShell version? If you don’t, you miss out on bug fixes and features, and maybe you cannot run all scripts. Let’s find out your PowerShell version:
The variable $PSVersionTable lists the versions of PowerShell (“PSVersion”) and related components. Use a dot (“.”) to drill deeper into the information.
- Version 1.0: shipped 2006 as optional download. Obsolete.
- Version 2.0: shipped 2009 as part of Windows 7/Server 2008. The only version that still supports Windows XP and Server 2003.
- Version 3.0: shipped 2012 as part of Windows 8/Server 2012. Completed the core language features and started to ship the ISE Editor.
- Version 4.0: shipped 2013 as part of Windows 8.1/Server 2012R2. Added DSC (Desired State Configuration)
- Version 5.0: shipped 2015 as part of Windows 10. This version is a major milestone with various new features and language extensions.
- Version 5.1: shipped 2016 as part of Windows 10 Anniversary Update and Server 2016.
If you don’t run Version 5.1, then here is what to do:
- On Clients with Windows 7 or better: Get the update! You can download it from www.powershellgallery.com or ask your IT department.
- On Clients with Windows 10: run the latest updates
- On Servers: Carefully check whether your server runs software that has special PowerShell requirements, like older versions of Microsoft Exchange. Update if you can.
PowerShell updates are free and come as .msu packages, so they can be distributed just like any other Windows update. If you run an outdated version of PowerShell, you’re not just missing features. It’s also a potential security risk.