How to Update PowerShell: A Complete Guide for Windows, macOS, and Linux PowerShell has evolved from a Windows-only task automation framework into a cross-platform powerhouse. Because there are now two distinct "versions" of PowerShell—the classic Windows PowerShell (v5.1) and the modern, open-source PowerShell (v7.x)—knowing how to update can be slightly confusing. This guide will walk you through the process for every version and operating system. 1. Understanding Your Current Version Before updating, you need to know what you’re currently running. Open your terminal. Type $PSVersionTable and hit Enter . Look for the PSVersion line. 5.1.x : You are on Windows PowerShell. This version is a component of the OS and generally doesn't receive new features. 7.x.x : You are on PowerShell Core. This is the version you should actively keep updated for the latest features and security. 2. How to Update PowerShell on Windows Method A: The Recommended Way (Winget) The Windows Package Manager ( winget ) is the fastest and most reliable way to update. Open PowerShell. Type the following command to see if an update is available: winget search Microsoft.PowerShell To install or update to the latest stable version, run: winget install --id Microsoft.PowerShell --source winget Method B: The MSI Installer (Manual) If you prefer a traditional installer: Go to the official PowerShell GitHub Releases page. Scroll down to the Assets section of the latest "Latest" release. Download the .msi file (usually PowerShell-7.x.x-win-x64.msi for 64-bit systems). Run the installer and follow the prompts. Method C: Windows Store You can also install PowerShell from the Microsoft Store . Once installed via the store, it will update automatically in the background just like any other app. 3. How to Update PowerShell on macOS On macOS, PowerShell is most commonly managed via Homebrew . Open your Terminal. Update Homebrew's indices: brew update Upgrade PowerShell: brew upgrade powershell --cask 4. How to Update PowerShell on Linux Update methods vary by distribution. Most users utilize the package manager specific to their OS. Ubuntu / Debian sudo apt-get update sudo apt-get install --only-upgrade powershell Use code with caution. RHEL / CentOS / Fedora sudo dnf upgrade powershell Use code with caution. 5. Can You Update Windows PowerShell 5.1? A common question is whether you can update version 5.1 to version 7.0. The answer is No. Windows PowerShell 5.1 is built on the .NET Framework, while PowerShell 7+ is built on .NET 8 (or newer). When you "update" to version 7, it installs side-by-side with version 5.1. You will still have powershell.exe (v5.1). You will now also have pwsh.exe (v7.x). Microsoft recommends using PowerShell 7 for all new automation scripts while keeping 5.1 for legacy system tasks. Summary Checklist Check version: $PSVersionTable Windows: Use winget install --id Microsoft.PowerShell macOS: Use brew upgrade powershell --cask Linux: Use your native package manager ( apt or dnf ). By keeping PowerShell updated, you gain access to improved performance, "Predictive IntelliSense," and better cross-platform compatibility.
Updating PowerShell: A Step-by-Step Guide PowerShell is a powerful task automation and configuration management framework from Microsoft, consisting of a command-line shell and a scripting language built on .NET. Keeping PowerShell up to date ensures you have the latest features, security patches, and bug fixes. Here's how to update PowerShell on your Windows system. For Windows 10 and Later Windows 10 and later versions come with PowerShell installed by default. You can update PowerShell using the Windows Update mechanism or by manually installing a newer version. Using Windows Update
Check for Updates : Go to Settings > Update & Security > Windows Update . Check for updates : Click on Check for updates and install any available updates.
Manually Updating PowerShell
Open PowerShell as Administrator : Right-click on the Start button and select Windows PowerShell (Admin) or Windows Terminal (Admin) if available. Check Current Version : Run Get-PowerShellVersion or $PSVersionTable.PSVersion to check your current PowerShell version. Visit the GitHub Repository : Go to the PowerShell GitHub releases page . Download the Latest Version : Click on the latest release and download the PowerShell-<version>-win-x64.zip or PowerShell-<version>-win-x86.zip file, depending on your system architecture. Extract and Install : Extract the contents of the zip file to a directory of your choice (e.g., C:\PowerShell\ ). You can then run PowerShell from that directory or add it to your PATH.
For Windows 7 and 8 For older systems like Windows 7 and 8, updating PowerShell might require more manual effort.
Check Current Version : Open PowerShell and run Get-PowerShellVersion or $PSVersionTable.PSVersion . Download and Install .NET Framework : Ensure you have .NET Framework 4.6.1 or later installed, as it's required for PowerShell 5 and later. Download PowerShell : Visit the PowerShell GitHub releases page and download the appropriate version for your system. Install PowerShell : Follow the installation instructions provided with the download. how to update powershell
Review Pros of Updating PowerShell:
Security : Newer versions often include security patches and improvements. Features : Updates can add significant new features and improvements to the PowerShell language and its capabilities. Compatibility : Ensures compatibility with the latest tools and technologies.
Cons:
Learning Curve : New versions might introduce changes that require learning and adaptation. Compatibility Issues : Some older scripts or tools might not be compatible with the latest PowerShell versions.
Recommendation: Regularly updating PowerShell is recommended for maintaining a secure and efficient development environment. If you're using an older version, consider updating to take advantage of the latest features and security enhancements. Always review the compatibility of your existing scripts and tools before updating.