Updating PowerShell to the latest or Preview release via REST method

Updating PowerShell to the latest or Preview release via REST method

2020, Apr 14    
  • Latest stable version:
    Invoke-Expression "& { $(Invoke-RestMethod 'https://aka.ms/install-powershell.ps1') }"
    
  • Latest Preview version
    Invoke-Expression "& { $(Invoke-RestMethod 'https://aka.ms/install-powershell.ps1') } -UseMSI -Preview"
    

Updating PowerShell to Preview release