1 |
Invoke-Expression "& { $(Invoke-RestMethod https://aka.ms/install-powershell.ps1) } -UseMSI" |
or
1 |
iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI" |
To determine your current PowerShell version, run the following:
1 |
Get-Host | Select-Object Version |
Thanks to Thomas Maurer and his blog post: https://www.thomasmaurer.ch/2019/07/how-to-install-and-update-powershell-7/