Professional Documents
Culture Documents
Installing PowerShell On macOS
Installing PowerShell On macOS
02/01/2023
PowerShell 7.0 or higher require macOS 10.13 and higher. All packages are
available on our GitHub releases page. After the package is installed, run pwshfrom
a terminal. Before installing, check the list of Supported versions below.
Note
There are several ways to install PowerShell on macOS. Choose one of the
following methods:
pwsh
When new versions of PowerShell are released, update Homebrew's formulae and
upgrade PowerShell:
brew update
brew upgrade powershell --cask
Note
The commands above can be called from within a PowerShell (pwsh) host, but
then the PowerShell shell must be exited and restarted to complete the upgrade and
refresh the values shown in $PSVersionTable.
After you've installed Homebrew, you can install PowerShell. First, install
the Cask-Versions package that lets you install alternative versions of cask
packages:
pwsh-preview
When new versions of PowerShell are released, update Homebrew's formulae and
upgrade PowerShell:
brew update
brew upgrade powershell-preview --cask
Note
The commands above can be called from within a PowerShell (pwsh) host, but
then the PowerShell shell must be exited and restarted to complete the upgrade.
and refresh the values shown in $PSVersionTable.
Installing PowerShell using the Homebrew tap method is also supported for stable
and LTS versions.
pwsh
When new versions of PowerShell are released, run the following command.
Note
Whether you use the cask or the tap method, when updating to a newer version of
PowerShell, use the same method you used to initially install PowerShell. If you
use a different method, opening a new pwsh session will continue to use the older
version of PowerShell.
If you do decide to use different methods, there are ways to correct the issue using
the Homebrew link method.
Starting with version 7.2, PowerShell supports the Apple M1 processor. Download
the install package from the releases page onto your computer. The links to the
current versions are:
PowerShell 7.3.2
o x64 processors - powershell-7.3.2-osx-x64.pkg
o M1 processors - powershell-7.3.2-osx-arm64.pkg
PowerShell 7.2.9
o x64 processors - powershell-7.2.9-osx-x64.pkg
o M1 processors - powershell-7.2.9-osx-arm64.pkg
You can double-click the file and follow the prompts, or install it from the terminal
using the following commands. Change the name of the file to match the file you
downloaded.
If you are running on macOS Big Sur 11.5 or higher you may receive the following
error message when installing the package:
Note
This is a known issue related to package notarization that will be addressed in the
future.
If you already have the .NET Core SDK installed, it's easy to install PowerShell as
a .NET Global tool.
Note
You can use this method to install any version of PowerShell including the latest:
Stable release: https://aka.ms/powershell-release?tag=stable
LTS release: https://aka.ms/powershell-release?tag=lts
Preview release: https://aka.ms/powershell-release?tag=preview
PowerShell 7.3.2
o x64 processors - powershell-7.3.2-osx-x64.tar.gz
o M1 processors - powershell-7.3.2-osx-arm64.tar.gz
PowerShell 7.2.9
o x64 processors - powershell-7.2.9-osx-x64.tar.gz
o M1 processors - powershell-7.2.9-osx-arm64.tar.gz
Use the following commands to install PowerShell from the binary archive.
Change the download URL to match the version you want to install.
Note
$PSHOME is /usr/local/microsoft/powershell/7.3.2/
User profiles are read from ~/.config/powershell/profile.ps1
Default profiles are read from $PSHOME/profile.ps1
User modules are read from ~/.local/share/powershell/Modules
Shared modules are read from /usr/local/share/powershell/Modules
Default modules are read from $PSHOME/Modules
PSReadLine history are recorded
to ~/.local/share/powershell/PSReadLine/ConsoleHost_history.txt
The following table contains a list of PowerShell releases and the status of support
for versions of macOS. These versions remain supported until either the version
of PowerShell reaches end-of-support or the version of macOS reaches end-of-
support.
Microsoft supports the installation methods in this document. There may be other
methods of installation available from other sources. While those tools and
methods may work, Microsoft can't support those methods.
Homebrew Web
Homebrew GitHub Repository
Homebrew-Cask