xxxxxxxxxx
iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"
xxxxxxxxxx
#Using the WinGet package manager
winget install --id=Microsoft.PowerShell -e
xxxxxxxxxx
Invoke-Expression "& { $(Invoke-Restmethod https://aka.ms/Install-PowerShell.ps1) } -UseMSI"
xxxxxxxxxx
# Open PowerShell as an administrator
# Run the following command to check the installed version
$PSVersionTable.PSVersion
# Ensure that you have administrative rights to install updates
# Run the following command to update Windows PowerShell
Set-ExecutionPolicy Unrestricted
iex "& { $(irm https://aka.ms/install-powershell.ps1 -UseBasicP) }"
xxxxxxxxxx
Invoke-Expression "& { $(Invoke-Restmethod https://aka.ms/Install-PowerShell.ps1) } -UseMSI"
xxxxxxxxxx
Invoke-Expression "& { $(Invoke-Restmethod https://aka.ms/Install-PowerShell.ps1) } -UseMSI"
xxxxxxxxxx
Invoke-Expression "& { $(Invoke-Restmethod https://aka.ms/Install-PowerShell.ps1) } -UseMSI"