Powershell Update Command Jun 2026
# Equivalent manual check: $latest = Invoke-RestMethod -Uri 'https://api.github.com/repos/PowerShell/PowerShell/releases/latest' $current = $PSVersionTable.PSVersion if ($latest.tag_name.TrimStart('v') -gt $current) Write-Host "Update available: $current -> $latest.tag_name"
Get-WindowsUpdate
If you use PowerShell to manage your entire PC, you can update all your installed applications (like Chrome, Zoom, or Slack) using a single command: winget upgrade --all Summary Table: PowerShell Update Commands Update-Module Update OS Install-WindowsUpdate (Requires module) Update Help Update-Help Update PS7 winget upgrade Microsoft.PowerShell Update Apps winget upgrade --all powershell update command
if ($PSVersionTable.PSVersion.Major -ge 7) try Write-Log "Checking for PowerShell Core update..." $oldVersion = $PSVersionTable.PSVersion.ToString() $result = Update-PowerShell -Stable -PassThru -Force -ErrorAction Stop Write-Log "PowerShell updated from $oldVersion to $($result.NewVersion)" # Equivalent manual check: $latest = Invoke-RestMethod -Uri