Fast Answer: Go to cmd (command prompt) -> Type: “$PSVersionTable”.

Full Answer:

PowerShell has made remarkable strides since its initial release in 2006. What began as version 1.0, launched alongside Windows XP and Vista, has evolved through multiple iterations, including version 5.1 for Windows Server 2003, which was released in January 2017. Today, with the progression to versions 6.0, 7.0, and the latest 7.2, PowerShell has become an essential and widely adopted tool across modern systems.

PowerShell 7 introduces an array of exciting new features, such as:

  1. Parallel Processing using the -Parallel parameter in the ForEach-Object cmdlet.
  2. The Get-Error cmdlet for simplified error exploration and troubleshooting.
  3. Enhanced integration of Windows modules for maximum system utility.
  4. The use of operators like ?: and ?? to streamline and accelerate code development.

With the release of PowerShell 6.0, users noticed the absence of a convenient tool to manage system updates via the Microsoft Update Service. Fortunately, Microsoft reintroduced this feature with version 7.2. Additionally, the new version includes predictive functionality in Windows Terminal, allowing users to anticipate future commands and optimize their workflow.

Despite these advancements, determining the version of PowerShell currently in use can be challenging, particularly with so many versions available. To quickly identify the version, simply open PowerShell and type the following command:

$PSVersionTable  
how to check powershell version
how to check powershell version

This command displays essential information, including the active PowerShell version.

Upgrading to a Newer Version of PowerShell

For optimal results, it’s recommended to keep both Windows PowerShell and PowerShell 7.2 installed on your system. While newer versions offer significant improvements, they may not natively support older scripts. To ensure compatibility, thoroughly test your scripts and modules before upgrading, as some may require modifications.

To upgrade or install PowerShell 7, you can run the following command directly:

iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"  

This script allows you to install the desired version seamlessly while maintaining compatibility between versions.

PowerShell is highly customizable, enabling users to adjust settings and features to suit their specific needs. By visiting the GitHub releases page, you can easily download the latest version—such as PowerShell 7.2.3—select the appropriate installer for your operating system, and start leveraging this versatile scripting tool for your projects.

With PowerShell, you have a powerful tool at your fingertips to manage systems efficiently, automate tasks, and enhance productivity like never before.