Updating PowerShell ensures you have the latest features, security patches, and bug fixes, which improves stability and compatibility with modern scripts and modules. You don’t need to reinstall Windows or download PowerShell separately—updates come through Windows Update or the Microsoft Store, depending on your version. PowerShell 7+ is the modern, cross-platform version and should be updated independently from the legacy Windows PowerShell 5.1 that ships with Windows.
What You'll Need
- A Windows 10 or Windows 11 device (PowerShell 7 does not run on Windows 7 or Server 2008 R2)
- Administrator privileges to install updates or packages
- An active internet connection
- Optional: Microsoft Store app installed and signed in (for PowerShell 7 via Store)
Step-by-Step
- Check your current PowerShell version by opening Command Prompt or Windows Terminal, typing
pwsh --versionand pressing Enter. If you see an error, you may not have PowerShell 7 installed. Then type$PSVersionTable.PSVersionin PowerShell to see the version of Windows PowerShell (5.1) you're running. - Open Windows Update by pressing
Win + Ito open Settings, then navigate to Windows Update. Click Check for updates. Install any available updates, especially if you see a cumulative update or feature update listed. Restart your device if prompted. - After Windows Update completes, open Microsoft Store. Search for PowerShell in the search bar. If you see PowerShell 7 by Microsoft listed, click Get or Update if an update is available. This installs or updates the modern PowerShell 7.x version.
- If PowerShell 7 is not available in the Store, go to the official GitHub releases page: github.com/PowerShell/PowerShell/releases. Download the latest
.msifile for Windows (e.g.,PowerShell-7.4.x-win-x64.msi). Avoid downloading.zipfiles unless you need portable use. - Run the downloaded
.msifile as Administrator. Right-click the file and select Run as administrator. Follow the installer prompts. Do not uncheck any default options unless you’re certain you need to customize the installation path. - After installation, close all open PowerShell windows. Open a new instance of PowerShell 7 by typing
pwshin the Start menu or Command Prompt and pressing Enter. Confirm the version withpwsh --version. You should see a version number like 7.4.1 or higher. - Verify that Windows PowerShell 5.1 is still present by typing
powershellin the Start menu. This is normal—Windows PowerShell 5.1 remains installed for backward compatibility with legacy scripts and tools. You now have both versions: usepowershellfor legacy scripts andpwshfor modern use. - Update PowerShell modules by opening PowerShell 7 as Administrator and running
Update-Module -Name * -Force. This updates all installed modules to their latest versions. You may be prompted to confirm updates—typeAto accept all.
Common Mistakes
- Running
Update-Modulein Windows PowerShell 5.1 instead of PowerShell 7—this can fail because some modules require PowerShell 7 features. - Downloading PowerShell 7 from unofficial sites or third-party download portals, which may bundle malware or outdated versions.
- Assuming Windows Update will update PowerShell 7—it won’t. PowerShell 7 is a separate product and must be updated manually via Store or MSI.
- Confusing the PowerShell 7 executable (
pwsh) with the legacy Windows PowerShell executable (powershell). Always usepwshfor new scripts and automation. - Not restarting the terminal after installing PowerShell 7. Changes may not take effect until you open a fresh session.
Tips
- Use Windows Terminal (available from Microsoft Store) as your default shell—it supports both PowerShell 5.1 and PowerShell 7 in separate tabs and lets you customize profiles.
- Pin PowerShell 7 to your taskbar or Start menu by right-clicking the
pwshresult in Start and selecting Pin to taskbar. - Set PowerShell 7 as your default terminal in Windows Terminal by going to Settings > Profiles > Default profile and selecting PowerShell 7.
- Use
Get-Module -ListAvailableto see all installed modules and their versions before updating. - Always run
Set-ExecutionPolicy RemoteSigned -Scope CurrentUserin PowerShell 7 if you plan to run local scripts—this is safer than unrestricted and allows signed scripts to run. - Backup your PowerShell profile before major updates: type
notepad $PROFILEto open your profile script, then copy its content to a safe location.
Troubleshooting
- If
pwshis not recognized after installing the MSI, restart your computer. If it still doesn’t work, check if the installation path (C:\Program Files\PowerShell\7) exists and is in your system PATH. Open Command Prompt and typeecho %PATH%to verify. - If Windows Update shows no PowerShell updates, that’s normal—PowerShell 7 is not updated through Windows Update. Rely on Store or MSI instead.
- If you get a permission error when running
Update-Module, open PowerShell 7 as Administrator before running the command. - If the Microsoft Store says PowerShell 7 is not available in your region, use the MSI installer from GitHub. Region restrictions on the Store do not affect direct downloads.
- If PowerShell 7 crashes on launch, uninstall it via Settings > Apps > Installed apps, then reinstall from the official MSI. Do not delete folders manually.
- If you see a warning about scripts being blocked, run
Set-ExecutionPolicy RemoteSigned -Scope CurrentUseras Administrator in PowerShell 7.
Frequently Asked Questions
Can I update PowerShell without administrator rights?
No. Installing or updating PowerShell requires administrator privileges because it modifies system-wide files and registry entries. If you’re on a work computer, contact your IT department.Do I need to uninstall PowerShell 5.1 before installing PowerShell 7?
No. PowerShell 5.1 and PowerShell 7 coexist safely. PowerShell 7 is designed to run alongside it without conflict.What if the PowerShell 7 MSI installer fails?
Run the Microsoft Fix It tool for Windows Installer, or use the PowerShell 7 .zip package and extract it to a folder you can access. Runpwsh.exe directly from that folder without installing.
Will updating PowerShell break my existing scripts?
Most scripts written for PowerShell 5.1 will work in PowerShell 7, but some legacy cmdlets or modules may behave differently. Test scripts in PowerShell 7 before replacing them in production. Usepowershell to run legacy scripts if needed.