# Run as Administrator $latestRelease = Invoke-RestMethod -Uri "https://api.github.com/repos/PowerShell/PowerShell/releases/latest" $assets = $latestRelease.assets | Where-Object name -like "*win-x64.msi" $downloadUrl = $assets.browser_download_url $installerPath = "$env:TEMP\PowerShell-latest.msi" Invoke-WebRequest -Uri $downloadUrl -OutFile $installerPath msiexec /i $installerPath /quiet /norestart Remove-Item $installerPath 3. Updating Windows PowerShell 5.1 Windows PowerShell 5.1 is updated through Windows Update . You cannot manually update it via commands, but you can ensure you have the latest: Check for updates via command line: # Run as Administrator Install-Module PSWindowsUpdate -Force Get-WindowsUpdate Install-WindowsUpdate -MicrosoftUpdate Or use wuauclt (deprecated but still works):
choco upgrade powershell-core -y To keep PowerShell 7 automatically updated, create a scheduled task:
Open PowerShell as Administrator (right-click Start > Terminal (Admin) or PowerShell (Admin)).
Search for available PowerShell versions:
Keeping PowerShell updated ensures you have the latest features, security patches, and performance improvements. Windows 11 comes with PowerShell 5.1 (built-in, stable) but you can install newer versions (PowerShell 7+), which are updated separately.
# Update PowerShell to the latest stable release iex "& $(irm https://aka.ms/install-powershell.ps1) -UseMSI -Quiet" Or use the more direct method (if update command is available):
Update Powershell Command Windows 11 May 2026
# Run as Administrator $latestRelease = Invoke-RestMethod -Uri "https://api.github.com/repos/PowerShell/PowerShell/releases/latest" $assets = $latestRelease.assets | Where-Object name -like "*win-x64.msi" $downloadUrl = $assets.browser_download_url $installerPath = "$env:TEMP\PowerShell-latest.msi" Invoke-WebRequest -Uri $downloadUrl -OutFile $installerPath msiexec /i $installerPath /quiet /norestart Remove-Item $installerPath 3. Updating Windows PowerShell 5.1 Windows PowerShell 5.1 is updated through Windows Update . You cannot manually update it via commands, but you can ensure you have the latest: Check for updates via command line: # Run as Administrator Install-Module PSWindowsUpdate -Force Get-WindowsUpdate Install-WindowsUpdate -MicrosoftUpdate Or use wuauclt (deprecated but still works):
choco upgrade powershell-core -y To keep PowerShell 7 automatically updated, create a scheduled task: update powershell command windows 11
Open PowerShell as Administrator (right-click Start > Terminal (Admin) or PowerShell (Admin)). Terminal (Admin) or PowerShell (Admin)).
Search for available PowerShell versions: update powershell command windows 11
Keeping PowerShell updated ensures you have the latest features, security patches, and performance improvements. Windows 11 comes with PowerShell 5.1 (built-in, stable) but you can install newer versions (PowerShell 7+), which are updated separately.
# Update PowerShell to the latest stable release iex "& $(irm https://aka.ms/install-powershell.ps1) -UseMSI -Quiet" Or use the more direct method (if update command is available):