Now PowerShell is open source. It can be installed on Linux and Mac. The Microsoft PowerShell packages for the 64-bit versions of Ubuntu 16.04, Ubuntu 14.04, CentOS 7, RedHat Enterprise Linux 7 and Mac OS X 10.11 can be downloaded from PowerShell’s GitHub page. Now let’s see how to install PowerShell on Mac.
How to Install Microsoft PowerShell on OS X
1. First download the PowerShell Packages from PowerShell’s GitHub page. Below are the option for Mac:
Mac: Download the package ending in .pkg
2. Now you need to sidestep Gatekeeper to install the package as it is not signed at the moment. For that you need to right-click .pkg file and select Open. Then agree to run the installer.
3. When PowerShell has been installed, open a terminal.
4. Then run the powershell command. This will open the PowerShell shell environment.
5. This is open the PowerShell shell environment with a prompt beginning with PS.
6. When you wish to leave the PowerShell prompt, type
7. Then press Enter or close the terminal.