Installing PowerShell on macOS
PowerShell Core 6 supports macOS 10.2 and beyond. There exist different ways to bring PowerShell to your system, the easiest setup is most likely to install it via homebrew, as most macOS users are using it as their favorite package manager.
Once brew is installed, open a terminal window and run:
brew cask install powershell
This command will install the latest version of PowerShell on your Mac.
You can run (now and in future) the following command to keep your installation up to date:
brew update brew cask upgrade powershell
That's it! Run the following command in your terminal window to run PowerShell:
This will open the PowerShell environment on your macOS machine:
I'm not using the built-in terminal but "iTerm2", which is a useful terminal replacement.
In your opened PowerShell terminal instance you can type in:
and you will get a few information of your installed PowerShell version:
It is good practice to update the built-in help system, as Microsoft only delivers a basic version out-of-the-box:
Furthermore, you can download a copy of the help system locally:
save-help -DestinationPath /Users/jmu/Downloads/ -force -verbose