How to Upgrade the PowerShell in Windows
Below is step by step guide to upgrade the PowerShell Shell Version on Windows 7, first we will check current version of PowerShell. As we know there are multiple way to anything in PowerShell.
(Get-Host).Version
$Host.Version
PSVersionTable.PsVersion
Get-Host | Select-Object Version
Now we will upgrade PowerShell version to 5.1 and see the below table to get the right version as per your OS.
Now we will download the Windows Management Framework 5.1
https://www.microsoft.com/en-us/download/details.aspx?id=54616
After downloading, first we have to change the execution policy to allow the running of remote scripts
Set-ExecutionPolicy RemoteSigned –Force
Please verify that the execution policy has been configured correctly,
Get-ExecutionPolicy
Now execute the downloaded setup.
Update Upgrading your PowerShell restart your machine and check the version as shown below.
Upgraded successfully !