Microsoft now supports PowerShell on the Mac and with just a few commands, you can have a PowerShell IDE running on Mac's running macOS 10.12 or higher. To install PowerShell on a Mac:
- Open a Mac terminal window.
- Install Homebrew using the following command (you will be prompted during install for your Mac's password):
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install PowerShell using the following command:
brew cask install powershell
- To edit and work with PowerShell scripts, download and install Visual Studio Code from here:
Extract the application from the ZIP file and copy it to your Applications folder.
When you first run Visual Studio Code and open a PowerShell file, you will be prompted to install the PowerShell utilities. Install these utilities to let you edit and run scripts from within Visual Studio Code.