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

  1. 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.
  2. Run the installer (Windows):
    1. Double-click the downloaded `.exe` file.
    2. 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.
    3. Click "Next" until the installer completes.
    4. Restart your PC if prompted (or reboot if you installed for all users).
    MacOS/Linux: Extract the downloaded file and navigate to the folder in a terminal. Run: ./PowerShell-7.4.0-darwin-x64.msi (Windows installer for macOS) or: sudo ./PowerShell-7.4.0-x86_64.deb (Linux Debian-based systems).
  3. Verify installation by opening a new terminal (or Command Prompt) and typing: PowerShell --version. You should see output like Version 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"
    1. Ensure you added PowerShell to PATH during installation (check the installer screen for "Add to PATH").
    2. If on Windows, run the installer again and select "Install for current user only."
    3. Restart your terminal/command prompt after installation.
  • Error: "Module not signed"
    1. Run PowerShell as Administrator first.
    2. 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
    1. Close all background processes using Get-Process | Stop-Process -Force.
    2. Run PowerShell in a lightweight session: Start-Process powershell.exe -Verb RunAs -Wait (This reduces resource usage but requires admin rights.)

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:

  1. Check the service status: Get-Service powershell_ispw (Windows). If stopped, start it with Start-Service powershell_ispw.
  2. Run a diagnostic: powershell -NoProfile -Command "& { Write-Host 'Test'; exit 0 }" If it fails, the issue is likely with your user profile or PATH.
  3. Last resort: Reinstall PowerShell 7. Unregister the service first: Unregister-ScheduledJob -Name "PowerShell Startup" -Force (Windows).

For macOS/Linux:

  1. Check for filesystem permissions: ls -la /usr/local/bin/PowerShell (Should show executable permissions.)
  2. 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\\AppData\Local\PowerShell\7), 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 -Scope CurrentUser -Force.