Upgrade PowerShell Core Windows or Mac and Linux System

In this article, we shall discuss the steps to upgrade PowerShell Core Windows or Mac and Linux System. Microsoft officially stopped adding new features to “Windows PowerShell” (version 5.1) as it recieves security and bug fixes only. It is considered “feature complete” and is tied strictly to the Windows operating system as it is built on .NET Framework (Windows-only). Please, see Install Applications with Winget CLI on Windows, and Install and Manage Applications with Winget.
On the other hand, PowerShell 7 (also known as PowerShell Core) is cross platform and built on a different engine called .NET Core and runs on Windows, Linux, and macOS
Note: Updating to PowerShell 7.x (Core) does not replace your existing Windows PowerShell 5.1. They can co-exist with Windows PowerShell located at powershell.exe, and the new PowerShell 7 is at pwsh.exe.
See the image below for the difference.

Also, see How to install Winget CLI on Windows, how to install Winget CLI on Windows, and how to Install Winget on Windows Server.
Update PowerShell to v7.5.4 on Windows
You can update PowerShell by using winget on Windows to install the latest version from the Windows Package Manager repository. Winget, the client interface of the Windows Package Manager, is a powerful command-line tool built into Windows OS that can install and update PowerShell
To update PowerShell on a Windows system (Windows 11, or Windows Server as it is in my case). The most efficient way is using the built-in Windows Package Manager (winget). Open your existing PowerShell window as an Administrator and run the command below.
winget upgrade --id Microsoft.PowerShell

As you can see below, the update is in progress

Download of the current version is in progress.

As you can see below, the upgrade of PowerShell to v7.5.4 is complete.

Alternatively, you could search for “PowerShell” in the Microsoft Store app and click Update. You could also download the .msi from the official PowerShell GitHub.
Please, see how to keep Apps up to date on Windows devices, how to create a two-way Active Directory Trust, and how to create a new Azure SQL Database [PaaS].
Check PowersShell version
To determine the current version of PowerShell Core, please use the command below.
$PSVersionTable.PSVersion

Update PowerShell on Mac
On MacOS, to determine the PowerShell version, please run the comamnd below.
pwsh --version

On a Mac, the industry standard is to use Homebrew. You cannot “update” PowerShell by running an installer again. You should update your entire package list.
brew update
brew upgrade --cask powershell

Now, upgrade PowerShell

When prompted to enter password, enter and when complete. Please, verify PowerShell version

Please, see Preliminary Guide for WSUS Analysis and Initial Assessment, DMA Compatibility Mode: Prepare and Migrate Safely, and Preliminary Guide for Active Directory and Initial Assessment.
Update PowerShell on Linux
Linux handles PowerShell updates just like OS security patches. You register Microsoft’s repository once, and then your standard system update command handles the rest. In this article, I will be focusing on Ubuntu/Debian.
sudo apt-get update
sudo apt-get install --only-upgrade powershell
I hope you found this article o how to Upgrade PowerShell Core Windows or Mac and Linux System very useful. Please, feel free to leave a comment below.