Updating PowerShell to the latest or Preview release via REST method

Updating PowerShell to the latest or Preview release via REST method

  • 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

Eloy Salamanca