PowerShell Core on macOS, Linux, and Windows

Videographer | Photographer | Video Editor | Blogger | Tech Expert

PowerShell Core on macOS, Linux, and Windows

For the longest time, I have wanted a function version of PowerShell running on Mac OS X so I don’t have to work from two computers to perform the various tasks. Most of my Windows based laptops have been lesser attractive to use that my MacBook, mainly due to lack of performance, lack of battery life compared to the Mac, lack of screen resolution, etc… Besides, working in IT, I often find myself needing to use both platforms daily, but carrying multiple machines around can be troublesome at best.

So I have spent ages curating the Internet looking for ways to make the MacBook the one stop shop for the lot! The last piece of the puzzle has been PowerShell for performing various server management tasks or Office 365 PowerShell tasks, and my workaround has been to use a remote app served from a Windows Server so I can have a PowerShell window open “locally” on my Mac (locally term used very loosely here).

I have in the past tried numerous renditions of PowerShell implementations for Mac but none of them worked well or at all, required a lot of effort to get them going, etc.

I gave up on this adventure until I saw something this morning in my travels, I can’t even remember where or how I saw it to be honest, but I was intrigued.

I came across a link: https://aka.ms/pscore6

For installing on a Mac, it requires the use of the Homebrew package manager – you can get this at: https://brew.sh/.

Essentially, to install Brew, open up Terminal, and enter in the command:

/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

Once Brew is installed, you can install numerous Linux applications that have been successfully ported to Mac, such as Midnight Commander, simply enter in:

brew install mc

Now, to install PowerShell Core for macOS (requires macOS Sierra, 10.12 or later), enter in:

brew cask install pscore6

Once PSCore6 has been installed, simply start it within any terminal session by entering in:

pwsh

You’re done!

I am yet to actually take the time to give PowerShell Core a decent run, but some things to note about PowerShell Core:

  • It’s not identical to PowerShell.
  • PowerShell for Windows is based on .NET Framework
  • PowerShell Core is based on .NET Core
  • PowerShell Core has far fewer cmdlets and modules included compared to PowerShell
  • PowerShell was originally designed to facilitate management of Windows servers & services, such as Hyper-V
  • Since Hyper-V doesn’t run on macOS or Linux, I suspect that these cmdlets will be absent from PSC6 macOS & Linux versions.
  • Installing PowerShell Core on a Windows system does not replace the PowerShell version that’s already installed in Windows, instead they would run side by side.

Give it a red hot go and comment below your findings, thoughts, and feedback!

No Comments

Add your comment

error: Content is protected !!