Microsoft has stopped developing PowerShell 5.1 and all the new features will land on the new PowerShell, which is open source & cross platform. Learn how to install PowerShell 7 on Windows & Mac.
Once you have PowerShell installed, it is time to update it to the latest version (unless you already have it). Run the command pwsh to find out the version of the PowerShell installed on your machine.
Pwsh
In my case, I am running version 7.1.4 and the shell notifies me that there is a stable release version which is missing on my machine. In order to update the PowerShell to the latest version (v7.3.4), download the installer packages based on the version of the operating system.
Download PowerShell v7.3.4 for x64 Windows
Download PowerShell v7.3.4 for x86 Windows
If you have a Mac, download the 64-bit package or arm64 package depending on the make of the machine.
Once the installer has been downloaded to the machine, run it with admin privileges. Click the next button on the welcome screen.
Pick the installation location and click Next.
Select the custom options required and click Next.
You have the option to update PowerShell using the Microsoft Update or WSUS. Click next after selecting the options.
Click the install button.
Wait for the installation process to complete and click the finish button.
Verify the update by running the command pwsh on the shell.
Please let me know if you have any questions in the comments section.