Upgrading Windows PowerShell gives you access to newer cmdlets, better performance, and improved security. This guide walks you through checking your current version and installing the latest PowerShell (7.x) on Windows 10 and 11, using both the official MSI installer and the command-line method.
What You’ll Need
- A Windows 10 or 11 PC with internet access.
- Administrator rights on the computer (you’ll need to approve a UAC prompt).
- Optional: winget (Windows Package Manager) is preinstalled on most recent Windows 11 versions, but you can also use the MSI route if not.
Step-by-Step
- Check your current PowerShell version. Open PowerShell (Start > type “PowerShell” > press Enter). Type
$PSVersionTable.PSVersionand press Enter. Note the major version (e.g., 5.1). If it’s already 7.x, you may not need to upgrade. - Choose your installation method. The easiest is to use winget. Alternatively, download the MSI from the official GitHub releases page. Both methods are covered below.
- Option A: Install via winget (recommended). In the same PowerShell window, type
winget install --id Microsoft.PowerShell --source wingetand press Enter. Confirm the UAC prompt if it appears. This downloads and installs the latest stable version. - Option B: Install via MSI. Go to the PowerShell GitHub releases page (github.com/PowerShell/PowerShell/releases). Look for the latest release (e.g., v7.4.x). Download the
PowerShell-7.4.x-win-x64.msifile (choose x64 for 64-bit Windows, x86 for 32-bit). Double-click the downloaded file and follow the installer prompts. Accept the license, choose a destination folder (default is fine), and check the “Add to PATH” and “Enable PowerShell Remoting” options if you want them. Click Install. - Verify the upgrade. After installation, close and reopen PowerShell. Type
$PSVersionTable.PSVersionagain. You should now see a version like 7.4.x. Note that the new version launches as “pwsh” (PowerShell Core), not the old “powershell.exe”. - Set the new version as default (optional). If you want the new PowerShell to be the default when you type “PowerShell” in Start, you can change the Windows Terminal profile or pin the new app. In Windows Terminal, go to Settings > Startup > Default profile and select “PowerShell” (the one with the black icon, not the blue one).
Common Mistakes
- Confusing Windows PowerShell 5.1 with PowerShell 7. They are separate applications. Upgrading does not replace the old one; it installs a new one alongside. You’ll have both.
- Downloading the wrong architecture. If you’re on a 64-bit Windows, get the x64 MSI. Installing the x86 version on 64-bit Windows works but limits performance.
- Skipping the PATH step. If you don’t add PowerShell to PATH during MSI install, you can’t run
pwshfrom a command prompt. You can still launch it from the Start menu. - Forgetting to close and reopen terminals. The new version won’t appear in an already-open PowerShell window. Always close and reopen.
Tips
- Use the MSI for silent installs. If you manage multiple machines, you can run the MSI with
/quietflag from an elevated command prompt. - Check for updates regularly. PowerShell 7 releases new minor versions frequently. Use
winget upgrade Microsoft.PowerShellto update. - Keep the old version for compatibility. Some older scripts or modules may not work in PowerShell 7. You can run them with
powershell.exewhen needed. - Learn the new features. PowerShell 7 includes features like
ForEach-Object -Parallel, ternary operators, and improved error handling. Check the official docs for a list.
Troubleshooting
- winget not found. If you get “winget: command not found”, you’re on an older Windows 10 build. Update Windows or use the MSI method instead.
- Installation fails with error. Try running the MSI as administrator (right-click > Run as administrator). Also ensure you have the latest Windows updates installed.
- New version doesn’t appear in Start menu. Sometimes the Start menu search index lags. Try typing “pwsh” instead of “PowerShell”. If it’s not there, check the installation folder (default:
C:\Program Files\PowerShell\7\pwsh.exe). - Can’t run scripts after upgrade. Execution policy is separate from version. If you get a security error, run
Set-ExecutionPolicy RemoteSigned -Scope CurrentUserin the new PowerShell. - Modules from old version not available. PowerShell 7 uses a different module path. You can import modules from Windows PowerShell by adding the path:
$env:PSModulePath += ";$env:ProgramFiles\WindowsPowerShell\Modules"(temporary) or set it permanently in your profile.
Frequently Asked Questions
Is it safe to upgrade? Will it break my existing scripts?
It’s safe because the old version (5.1) remains installed. Most scripts that work in 5.1 will work in 7, but some older modules may not. You can always run the old version by typing powershell.exe.
Do I need to uninstall the old version first?
No. They can coexist. In fact, it’s recommended to keep the old version for compatibility.
What’s the difference between Windows PowerShell and PowerShell Core?
Windows PowerShell 5.1 is built on .NET Framework and is Windows-only. PowerShell 7 (formerly Core) is built on .NET Core/.NET 5+, and is cross-platform (Windows, Linux, macOS). It also includes many new features and performance improvements.
How often are updates released?
PowerShell 7 gets a new minor version about every 6 months, with patch releases in between. You can check the GitHub releases page or use winget to update.
Can I use PowerShell 7 in Windows PowerShell ISE?
No, the ISE is deprecated and only works with Windows PowerShell 5.1. For PowerShell 7, use Visual Studio Code with the PowerShell extension, or the built-in Windows Terminal.
Is PowerShell 7 free?
Yes, it’s open-source and free to use, even for commercial purposes.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Fix Windows 10 Wi-Fi Not Connecting: Step-by-Step
- Scaling Headless Chrome: A Practical Guide
- Fix Windows Upgrade Error 0x80090011
- Fix Microsoft Store Apps Not Updating
- v0 Alternatives: Which Fits Your Web App Build?9.26 yd³
- Fix Hard Disk Error 0x80071ac3