To install PowerShell 7, you get a modern, cross-platform command-line shell with improved performance, better security, and better integration with modern Windows, Linux, and macOS tools—all in an open-source package you can run without admin rights on most systems. Just download the installer from Microsoft’s official sources, then follow the steps below.
What You'll Need
- An operating system that officially supports PowerShell 7 (Windows 10 2004+, Windows 11, macOS 11+, or Linux distributions like Ubuntu 20.04+ or Fedora 33+)
- At least 4GB of RAM (8GB recommended for heavy scripting)
- A stable internet connection for downloading
- Administrator privileges only if you need to install system-wide (e.g., for service registration)
- An official Microsoft download link (avoid third-party sources)
Step-by-Step Installation
- Download the installer from Microsoft's official GitHub releases page. For Windows, choose the `.exe`; for macOS/Linux, use the `.dmg` (macOS) or `.deb`/`.rpm` (Linux) file. The latest stable version is 7.4+ as of 2024, but check the latest link for updates.
-
Run the installer (Windows):
- Double-click the downloaded `.exe` file.
- On the first screen, select "Custom" or "Install for all users" (depending on your needs). Check "Add PowerShell to PATH"**—this is critical for easy access from any folder.
- Click "Next" until the installer completes.
- Restart your PC if prompted (or reboot if you installed for all users).
./PowerShell-7.4.0-darwin-x64.msi(Windows installer for macOS) or:sudo ./PowerShell-7.4.0-x86_64.deb(Linux Debian-based systems). -
Verify installation by opening a new terminal (or Command Prompt) and typing:
PowerShell --version. You should see output likeVersion 7.4.0(or current version) and the commit hash. If not, check if PATH was set correctly.
Common Mistakes & How to Fix Them
- Error: "PowerShell not found"
- Ensure you added PowerShell to PATH during installation (check the installer screen for "Add to PATH").
- If on Windows, run the installer again and select "Install for current user only."
- Restart your terminal/command prompt after installation.
- Error: "Module not signed"
- Run PowerShell as Administrator first.
- If the error persists, sign the module manually:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser(Note: This only applies to *existing* modules; new ones will still need signing.)
- Slow performance
- Close all background processes using
Get-Process | Stop-Process -Force. - Run PowerShell in a lightweight session:
Start-Process powershell.exe -Verb RunAs -Wait(This reduces resource usage but requires admin rights.)
- Close all background processes using
Tips for a Smooth Install
1. Prefer the official GitHub releases—third-party sources may include malware or outdated versions.
2. Test installation early by running Get-Host in PowerShell to check the host type (Core, Desktop, etc.).
3. For Linux users, install dependencies first (e.g., `libnsl-dev` for macOS builds) if you encounter linking errors.
4. If you need .NET Framework compatibility, install dotnet-sdk-7.0.x alongside PowerShell 7.
5. Use PowerShell 7's built-in modules for cross-platform tasks (e.g., Import-Module AzureAD works on Linux/macOS if the SDK is installed).
6. Avoid editing the installer script unless you know what you're doing—uninstalling later may break system tools.
Troubleshooting
If PowerShell 7 still won’t launch:
- Check the service status:
Get-Service powershell_ispw(Windows). If stopped, start it withStart-Service powershell_ispw. - Run a diagnostic:
powershell -NoProfile -Command "& { Write-Host 'Test'; exit 0 }"If it fails, the issue is likely with your user profile or PATH. - Last resort: Reinstall PowerShell 7. Unregister the service first:
Unregister-ScheduledJob -Name "PowerShell Startup" -Force(Windows).
For macOS/Linux:
- Check for filesystem permissions:
ls -la /usr/local/bin/PowerShell(Should show executable permissions.) - Reinstall with sudo if needed:
sudo apt install powershell(Debian/Ubuntu).
Frequently Asked Questions
Why does PowerShell 7 require the latest .NET Core?
PowerShell 7 relies on .NET Core 3.1+ for cross-platform compatibility. If you install 7.x but not the SDK, modules may fail to load or scripts won’t execute.
Can I run PowerShell 7 on Windows 7?
No. Microsoft no longer supports Windows 7 for PowerShell 7, and it won’t work without .NET Core 3.1+.
What’s the difference between PowerShell 5.1 and PowerShell 7?
PowerShell 7 is a standalone, open-source project with a module-based architecture. It’s lighter, faster, and works on Linux/macOS. PowerShell 5.1 is Windows-only and uses a different core.
How do I remove PowerShell 7?
Windows: Unregister the service, delete files in:
C:\Program Files\PowerShell\7 (or C:\Users\), and remove registry entries (only if needed).
macOS/Linux: Run:
rm -rf /usr/local/bin/PowerShell /usr/local/PowerShell/7 (Linux) or sudo rm -rf /Library/Application\ Support/PowerShell/7 (macOS).
Does PowerShell 7 replace Windows PowerShell?
No. PowerShell 7 is a separate project with different dependencies. Use PowerShell 7 for cross-platform scripting and Windows PowerShell 5.1 for Windows-only tasks.
What if I get a "Module cannot be loaded" error?
Run:
Set-ExecutionPolicy RemoteSigned -Force
(Windows only). For Linux/macOS, ensure the module is in your $env:PSModulePath or install it with Install-Module -Name .