Update Powershell Command Windows 11 «ORIGINAL ✔»
Windows PowerShell 5.1 is updated through . You cannot manually update it via commands, but you can ensure you have the latest:
Or use wuauclt (deprecated but still works):
Note: Update-PowerShell is available starting from PowerShell 7.0.3.
$PSVersionTable.PSVersion
When you run the update command, you are installing the modern "PowerShell Core," which runs alongside the legacy version.
winget upgrade --id Microsoft.PowerShell.Preview
$PSVersionTable.PSVersion
Verify installation:
# Check for updates pwsh -c "Update-PowerShell -PassThru"
winget upgrade --id Microsoft.PowerShell update powershell command windows 11
choco upgrade powershell-core -y
In the past, updating PowerShell required downloading a .msi installer manually from GitHub. winget handles the logic of finding the latest release from the Microsoft repository, downloading it, and executing the installer silently in the background.