Install PowerShell on Mac

Install PowerShell on Mac

It’s a weird thing to say, but we can install PowerShell on Mac after the announcement from Microsoft that PowerShell will be available for both Macintosh and Linux. It’s pretty easy to accomplish but having a great scripting language like PowerShell available for Mac is really cool and deserves a blog post. I mean, now I don’t even need to fire up my Windows virtual machine just to run PowerShell!

To get started, download the OSX .pkg file from the github page: https://github.com/PowerShell/PowerShell/releases/

Once the file is downloaded you’ll need to find the download and right click and choose open. This will start the installation process.

MacOSPosh1

Click Next on the Introduction Page.

MacOSPosh1-1

Select the Destination Disk and click Next.

MacOSPosh1-2   Select the installation location and click Install.

MacOSPosh1-3

Enter in the administrative credentials to install the software and click Install Software.

MacOSPosh1-4

When the installation is finished click Close.

MacOSPosh2

 

Once the install is complete, open a Terminal Window and run “powershell”. Once you do this, you’ll be able to execute PowerShell commands. The example below I ran “get-host” to find the PowerShell version that was installed. I will note that the Install-Module commands don’t work quite yet so adding things like PowerCLI and AzureRM modules won’t be super easy to accomplish yet. This will probably change soon. After all, this is a very early release.

MacOSPosh3

 

Leave a reply