The quick download
You can run PowerShell on Mac for scripting, testing, and automation.
Choose the installation method that best fits your workflow, then verify your PowerShell Mac setup before running scripts.
-
Windows PowerShell for Mac runs natively on macOS and supports Apple Silicon and Intel Macs, but Windows-specific modules and cmdlets may require a Windows environment.
-
Homebrew is the simplest option for most users because it simplifies installation and upgrades. The
.pkginstaller is convenient for a standard Mac installation. The .NET global tool suits .NET developers, while binary archives are intended for advanced deployments.
-
Use
pwsh --versionto verify the installation, and use Visual Studio Code with the PowerShell extension for IntelliSense, debugging, and script execution.
-
Install PowerShell for Mac, verify that it works, and test your scripts before using them with Windows, Azure, or LogicMonitor environments
You can install PowerShell 7 on macOS using several methods, including Homebrew, the macOS .pkg installer, the .NET global tool, or a binary archive. Once the installation is complete, launch PowerShell directly from the macOS Terminal using the pwsh command.
This guide covers the various Windows PowerShell for Mac installation methods, how to verify your setup, how to configure PowerShell for development in Visual Studio Code, and troubleshooting common issues.
Prerequisites for Installing Windows PowerShell on Mac
Before you begin, make sure you have:
- A Mac running a supported macOS version supported by your chosen PowerShell release
- An Apple Silicon or Intel processor
- Terminal access
- Administrator privileges for some installation methods
- Xcode Command Line Tools if you plan to use Homebrew
Note: This guide was tested with PowerShell version 7.6 on macOS. PowerShell supports Apple Silicon and Intel Macs, but supported macOS versions and the latest release can change. Check Microsoft’s official PowerShell installation documentation (Mac PowerShell webpage) before installing.
You only need to identify your Mac’s processor architecture for the direct .pkg and binary archive methods. Apple Silicon uses arm64 packages, Intel Macs use x64 packages, and Homebrew selects the appropriate architecture automatically.
To identify your Mac’s processor architecture, run:
uname -mThe result indicates your processor type:
- arm64 means your Mac uses Apple Silicon
- x86_64 means your Mac uses an Intel processor
If you plan to install PowerShell with Homebrew, install the Xcode Command Line Tools if they are not already available:
xcode-select --installHow to Install PowerShell on macOS Using Homebrew
The easiest way to install PowerShell for Mac is with Homebrew. If Homebrew is not already installed, run the current Homebrew installer:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Homebrew may display additional instructions for adding itself to your PATH. Follow those instructions before continuing.
Then install PowerShell:
brew install --cask powershellAfter installation, launch PowerShell:
pwshYou should see a PowerShell prompt. To exit PowerShell, run:
exitThe older commands below are no longer valid and should not be used:
brew tap caskroom/cask
brew cask install powershellHomebrew Cask is now built into Homebrew, so a separate Cask tap is not required.
Install PowerShell Without Homebrew
Homebrew is convenient, but it is not the only way to install PowerShell on Mac.
| Installation method | Best for | Requires | Main drawback | Upgrade approach |
|---|---|---|---|---|
| Homebrew cask | Most users | Homebrew | Homebrew-managed install | brew upgrade –cask powershell |
| .pkg installer | Standard Mac installation | Admin access | Manual upgrades | Download and install the newer package |
| .NET global tool | .NET developers | .NET SDK | PATH configuration may be needed | dotnet tool update –global PowerShell |
| Binary archive | Automation or custom deployments | Deployment knowledge | Manual dependencies and updates | Replace the existing archive |
Choose one installation method only. Installing PowerShell through multiple methods can create duplicate installations, PATH conflicts, or confusion about which version is being updated.
Although Homebrew is the recommended option for most users, use the .pkg installer, .NET global tool, or binary archive only if it better fits your deployment needs.
Microsoft supports the installation methods documented in its PowerShell installation guide.
Option 1: Install PowerShell with the macOS Package Installer
Download the appropriate .pkg file from the PowerShell releases page.
Choose the package that matches your Mac:
- osx-arm64.pkg for Apple Silicon
- osx-x64.pkg for Intel
Open the downloaded package and follow the installation prompts.
Recent PowerShell packages are signed and notarized by Microsoft. Older packages may trigger a macOS Gatekeeper warning. If macOS blocks the package after you have confirmed that it came from the official PowerShell release page, open:
System Settings > Privacy & Security > Open Anyway
For command-line installation, use the package path that matches your downloaded file:
sudo installer -pkg ./Downloads/powershell-version-osx-arm64.pkg -target /Only bypass Gatekeeper for packages downloaded from a trusted, official source.
Option 2: Install PowerShell as a .NET Global Tool
If the .NET SDK is already installed, you can install PowerShell with:
dotnet tool install --global PowerShellThen open a new Terminal window and run:
pwshIf the shell cannot find pwsh, make sure the .NET tools directory is included in your PATH:
echo $PATHThe .NET global tool commonly installs to:
~/.dotnet/toolsOption 3: Install PowerShell From a Binary Archive
Binary archives are intended for advanced deployment scenarios. Download the appropriate .tar.gz file from the PowerShell releases page.
The following example uses an Apple Silicon archive. Change the version and architecture as needed. Then, create the installation directory:
sudo mkdir -p /usr/local/microsoft/powershell/7Extract the archive:
sudo tar zxf /tmp/powershell.tar.gz \
-C /usr/local/microsoft/powershell/7Set the executable permission:
sudo chmod +x /usr/local/microsoft/powershell/7/pwshCreate a symbolic link:
sudo ln -s \
/usr/local/microsoft/powershell/7/pwsh \
/usr/local/bin/pwshBecause binary archive installations require you to manage dependencies and upgrades manually, Homebrew or the .pkg installer is usually simpler.
How to Start PowerShell and Confirm the Version
After installation, verify PowerShell from Terminal:
pwsh --versionYou can also launch PowerShell:
pwshThen run:
$PSVersionTable.PSVersionExample output:
Major Minor Patch
----- ----- -----
7 6 5The exact version may differ depending on when you install PowerShell.
To run a PowerShell script from macOS Terminal:
pwsh ./script.ps1To run the script from inside PowerShell:
./script.ps1If pwsh –version returns a version and $PSVersionTable.PSVersion displays the expected values, PowerShell is installed and available on your PATH.
How to Set Up and Test PowerShell in Visual Studio Code
After installing Visual Studio Code and the Microsoft PowerShell extension, open an existing .ps1 file or create a new one:
- Open Visual Studio Code.
- Select the Extensions icon.

- Search for PowerShell.
- Confirm that the extension is published by Microsoft.
- Select Reload after installation if prompted.
- Open the integrated terminal by selecting Terminal → New Terminal.
- Choose PowerShell as the terminal profile.
- Run the following command:
$PSVersionTable.PSVersion
If Visual Studio Code displays the installed PowerShell version, the extension and PowerShell installation are working correctly.
To test script execution, add the following to a .ps1 file:
Write-Output "PowerShell is working in Visual Studio Code"Run the file using the Run button or execute it from the integrated terminal:
./script.ps1The script should return:
PowerShell is working in Visual Studio CodeWhat Is the PowerShell ISE Equivalent on Mac?
PowerShell ISE is not available on macOS. The modern PowerShell ISE equivalent for Mac is Visual Studio Code with the Microsoft PowerShell extension.
Set Up Visual Studio Code for PowerShell
To set up VS Code for PowerShell:
- Download and install Visual Studio Code.
- Open Visual Studio Code.
- Select the Extensions icon.
- Search for PowerShell.
- Install the PowerShell extension published by Microsoft.
- Select Reload if Visual Studio Code asks you to reload the extension.
The extension provides:
- Syntax highlighting
- IntelliSense
- Code completion
- Integrated PowerShell sessions
- Script execution
- Debugging
- Breakpoints
- Variable inspection
- PowerShell formatting
To verify PowerShell inside Visual Studio Code, open the integrated terminal and run:
pwsh --versionYou can then create or open a .ps1 file and run it using the editor’s Run or Debug controls.
Useful optional extensions include:
- GitLens for version-control visibility
- Pester for PowerShell testing
- YAML or JSON extensions when working with automation and configuration files
Configure PowerShell as the Visual Studio Code Terminal
Open the integrated terminal and select PowerShell as the terminal profile. If PowerShell is not listed, confirm that pwsh works in macOS Terminal and that its installation directory is included in your PATH.
For advanced users, macOS-specific PowerShell settings can be configured in:
~/.config/powershell/profile.ps1How to Update PowerShell on macOS
If you installed PowerShell with Homebrew, update Homebrew and PowerShell separately:
brew updatebrew upgrade --cask powershellIf you installed PowerShell with the .NET global tool, run:
dotnet tool update --global PowerShellIf you installed PowerShell with a .pkg file or binary archive, download and install the latest version from the official PowerShell releases page.
The outdated command below should not be used:
brew cask reinstall powershellHow to Uninstall PowerShell on macOS
For a Homebrew installation, run:
brew uninstall --cask powershellFor a .NET global tool installation, run:
dotnet tool uninstall --global PowerShellFor a package or binary archive installation, follow the uninstall instructions for that installation method in Microsoft’s PowerShell documentation.
The old command below is no longer valid:
brew cask uninstall powershellPowerShell on macOS Troubleshooting
If you encounter issues during installation or while running scripts, the following troubleshooting steps cover common configuration hurdles and error resolutions.
PowerShell Fails to Launch
If pwsh does not start after installation, check whether the command is available:
which pwshThen inspect your PATH:
echo $PATHIf PowerShell is installed but its location is missing from PATH, update your shell configuration file, such as:
~/.zshrcOpen a new Terminal window after changing the file.
zsh: command Not Found: pwsh
This message usually means that PowerShell is not installed or that its executable directory is not included in PATH.
Check the installation method you used, open a new Terminal session, and run:
which pwshIf you installed PowerShell as a .NET global tool, confirm that this directory is available:
~/.dotnet/toolsPermission Denied Errors
Permission errors can occur when installing packages, writing to protected directories, or executing scripts.
Confirm that your account has administrator privileges. Some installation commands require sudo, but use it only when the installation instructions specifically require elevated permissions.
.NET Version Errors
PowerShell depends on a compatible .NET runtime. If you receive a .NET-related error, check the installed SDK or runtime:
dotnet --versionThen compare it with the requirements for your PowerShell version. Install the required .NET components from the official .NET website or through Homebrew.
A Module Fails to Import
Not every PowerShell module supports macOS. If a module fails to import:
- Confirm that the module supports PowerShell 7.
- Confirm that it supports macOS.
- Check whether it requires Windows-only dependencies.
- Update PowerShell and the module.
- Install any required dependencies.
Azure PowerShell modules can generally be installed on macOS when the specific module supports PowerShell 7 and macOS. Check the module’s official documentation before relying on it in production.
PowerShell Runs Slowly
Check for background processes consuming CPU or memory. Also confirm that PowerShell is updated, because newer releases may include performance improvements.
Windows-Specific Cmdlets Do Not Work
Some Windows-only cmdlets and modules are not available on macOS. This can affect WMI, Windows event logs, Active Directory, and other Windows-specific functionality.
When a script depends on those components, test it on a Windows system, Windows virtual machine, or remote Windows host.
Note: Before using a script in production, run a small local test and confirm its dependencies.
For example:
Write-Output "PowerShell is working on macOS"
If the command is not found, run which pwsh and echo $PATH. A .NET global tool commonly uses ~/.dotnet/tools. If that directory is missing from PATH, add it to your shell configuration and open a new Terminal window. If a module fails to import, confirm that it supports PowerShell 7 and macOS. Windows-only modules require a Windows host or remote session.
Use PowerShell With LogicMonitor
PowerShell is an excellent tool for streamlining your LogicMonitor automation and monitoring workflows. By using PowerShell on macOS, you can develop and test your scripts locally before deploying them against your Windows systems or remote targets. This approach allows you to iterate faster and troubleshoot effectively without needing a dedicated Windows environment for initial development.
For those looking to get started or dive deeper, LogicMonitor offers extensive resources. You can explore a variety of PowerShell-based LogicModules in the Community Exchange for inspiration.
For implementation details, our guide to using PowerShell scripts in LogicMonitor covers the essentials, while our tutorial on learning and troubleshooting PowerShell scripts provides best practices for refining your automation.
Put PowerShell to work across your IT environment
Use PowerShell to automate tasks, test scripts, and support monitoring workflows with LogicMonitor’s PowerShell-based LogicModules.
FAQs
Is PowerShell the Same as Terminal on Mac?
No. Terminal is the macOS application that provides access to command-line shells. PowerShell is a shell and scripting language that can run inside Terminal or Visual Studio Code.
Can I Install PowerShellGet on Mac?
PowerShellGet support depends on the PowerShell version and module requirements. Confirm the module’s current compatibility information before installing it, and use only modules that support PowerShell 7 and macOS.



