How to install PowerShell core on MacOS
Do the following from the macOS console:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap caskroom/cask
Now you can install PowerShell by running:
brew cask install powershell
You can be sure it is working by running:
This should give you the powershell prompt and away you go!
Run the following from the console:
brew cask upgrade powershell
That should do it.
If for whatever reason you want to reinstall PowerShell use:
brew cask reinstall powershell
If you are nuts and want to remove PowerShell from macOS run:
brew cask uninstall powershell