PowerShell 7 is a free command-line tool you install once and then use to manage your network and automate tasks

PowerShell 7 is the current version of Microsoft's command-line shell. It runs on Windows, macOS, and Linux, and it replaces the older Windows PowerShell that came built into Windows. You download an installer from Microsoft's official repository, run it, and then open PowerShell 7 from your applications menu. The whole process takes about five minutes.

Unlike the old Windows PowerShell, PowerShell 7 is maintained actively and receives security updates regularly. If you manage a network or write scripts to automate repetitive tasks, you want this version, not the one that shipped with your operating system.

Key Takeaways

  • PowerShell 7 is a separate download from Microsoft; it does not replace Windows PowerShell automatically.
  • On Windows, you download an .msi installer file and run it like any other program, then restart your terminal.
  • On macOS and Linux, you use a package manager (Homebrew on Mac, apt or yum on Linux) to install it in one command.
  • After installation, you verify it worked by opening PowerShell 7 and typing $PSVersionTable.PSVersion to see the version number.

Installing PowerShell 7 on Windows

Go to the official PowerShell releases page at github.com/PowerShell/PowerShell/releases. Look for the latest release (the one at the top). Under "Assets", find the file named PowerShell-7.x.x-win-x64.msi (the x's are version numbers; download the one marked x64 if you have a 64-bit Windows system, which almost all modern Windows machines are). Click it to download.

Once the .msi file finishes downloading, open your Downloads folder and double-click the file. A setup window appears. Click Next, accept the license agreement, and click Next again. On the "Installation Options" screen, leave the defaults checked (they are correct for most users) and click Next. Click Install, then Finish when the installation completes.

After installation, close any open Command Prompt or PowerShell windows. Open the Start menu, type PowerShell 7, and click it. A terminal window opens. Type $PSVersionTable.PSVersion and press Enter. You should see version 7 followed by a dot and another number (like 7.4.1). If you see that, the installation worked.

Installing PowerShell 7 on macOS

The easiest way on macOS is to use Homebrew, a package manager that installs software from the command line. If you do not have Homebrew installed, open Terminal (in Applications > Utilities) and paste this command, then press Enter:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Once Homebrew is installed, open Terminal again and type:

brew install powershell

Press Enter and wait for the installation to finish. When it is done, type pwsh and press Enter to start PowerShell 7. Type $PSVersionTable.PSVersion to confirm you are running version 7.

Installing PowerShell 7 on Linux

The installation command depends on which Linux distribution you use. Open a terminal and run the command that matches your system.

On Ubuntu or Debian: Type sudo apt update, press Enter, then type sudo apt install powershell and press Enter again.

On Fedora, CentOS, or RHEL: Type sudo yum install powershell and press Enter.

After installation finishes, type pwsh to start PowerShell 7, then type $PSVersionTable.PSVersion to verify the version.

Updating PowerShell 7 later

Microsoft releases updates to PowerShell 7 several times a year. On Windows, go back to the releases page and download the newest .msi file, then run it the same way you did the first time. The installer updates your existing copy.

On macOS, type brew upgrade powershell in Terminal. On Linux, type sudo apt upgrade powershell (Ubuntu/Debian) or sudo yum upgrade powershell (Fedora/CentOS/RHEL).

Uninstalling PowerShell 7 if you need to

On Windows, open Settings, go to Apps > Apps & Features, find PowerShell 7 in the list, click it, and click Uninstall. Confirm when prompted.

On macOS, type brew uninstall powershell in Terminal. On Linux, type sudo apt remove powershell (Ubuntu/Debian) or sudo yum remove powershell (Fedora/CentOS/RHEL).

Frequently Asked Questions

Do I need to uninstall Windows PowerShell before installing PowerShell 7?

No. Windows PowerShell stays on your system, and PowerShell 7 installs alongside it. You can have both. When you type "PowerShell" in the Start menu, you will see both versions listed, and you can choose which one to open.

What is the difference between pwsh and PowerShell?

They are the same program. pwsh is the command you type to start PowerShell 7 from a terminal on macOS and Linux. On Windows, you usually click it from the Start menu, but you can also type pwsh in Command Prompt to launch it.

Will PowerShell 7 work on my 32-bit Windows system?

PowerShell 7 requires a 64-bit operating system. If your Windows is 32-bit, you cannot install PowerShell 7. You can check by opening Settings, going to System > About, and looking at "System type". If it says "32-bit", you are limited to the older Windows PowerShell.

Do I need administrator rights to install PowerShell 7?

Yes, on all three operating systems. On Windows, the installer will ask for permission. On macOS and Linux, the sudo command in front of the installation command handles this — you will be asked to enter your password.

Can I run PowerShell 7 scripts that were written for Windows PowerShell?

Most of them, yes. PowerShell 7 is designed to run scripts written for older versions. However, some very old scripts that rely on Windows-specific features may need small changes. If a script does not work, the error message usually tells you what needs to change.