Geekflare is supported by our audience. We may earn affiliate commissions from buying links on this site.
In Windows Last updated: November 10, 2022
Share on:
Invicti Web Application Security Scanner – the only solution that delivers automatic verification of vulnerabilities with Proof-Based Scanningā„¢.

Let’s help you with checking the PowerShell version and how to update it on a Windows Server.

Straightaway, PowerShell is more of a developer or Sysadmin stuff and was never created for the ordinary Windows user because they have the Common Prompt to play with (ouch 🤐).

In short, PowerShell also runs cmdlets in addition to the Command Prompt commands.

However, we aren’t here to differentiate PowerShell from Command Prompt. Instead, we’ll look at one Microsoft-recommended way that can tell you the PowerShell version.

And though there are other methods to do it all over the internet, they won’t work every time in all situations.

Check PowerShell Version

The first thing is to open PowerShell from the Windows search.

Next, type $PSVersionTable, and hit enter.

powershell-version

This outputs important information, including the current PowerShell version, edition, compatible versions, etc.

Now coming to other commands that ‘don’t’ work accurately. These include get-host, $host, $host-version, etc.

Notably, they give the version of the host PowerShell has been installed into and not the PowerShell engine version we’re after.

However, use get-host if you have PowerShell version 1.0 since $PSVersionTable was introduced from version 2.0. So this $PSVersionTable won’t give results when used on PowerShell 1.0.

Update PowerShell in Windows Server

You can update PowerShell in the Windows server via command line scripts or downloading and install specific PowerShell versions.

The simplest method is to grab the latest file from the Microsoft website or its GitHub repository and proceed with the installation.

A geeky way to do this from the PowerShell itself is by running iex "& { $(irm https://aka.ms/install-powershell.ps1)} -usemsi".

updating-powershell

This will connect to the MS GitHub repository. Next, respond to the following prompts, and the installation will be complete shortly.

powershell-updated-1

Notably, this won’t update the old PowerShell in the system. Instead, you’ll have the updated version installed alongside.

Summing up

This completes checking the PowerShell version and how to update it.

Cmdlets make PowerShell a powerful tool for automation. Still, it would help to take note of a few more scripting languages as a developer.

  • Hitesh Sant
    Author
    Hitesh works as a senior writer at Geekflare and dabbles in cybersecurity, productivity, games, and marketing. Besides, he holds master’s in transportation engineering. His free time is mostly about playing with his son, reading, or lying… read more
Thanks to our Sponsors
More great readings on Windows
Power Your Business
Some of the tools and services to help your business grow.
  • Invicti uses the Proof-Based Scanningā„¢ to automatically verify the identified vulnerabilities and generate actionable results within just hours.
    Try Invicti
  • Web scraping, residential proxy, proxy manager, web unlocker, search engine crawler, and all you need to collect web data.
    Try Brightdata
  • Monday.com is an all-in-one work OS to help you manage projects, tasks, work, sales, CRM, operations, workflows, and more.
    Try Monday
  • Intruder is an online vulnerability scanner that finds cyber security weaknesses in your infrastructure, to avoid costly data breaches.
    Try Intruder