Installing PowerShell on MacOS

 
Wait… what ??!??
 
You can have PowerShell on MacOS ???!???
 
Yep, and on Linux, too 🙂
 
Head over to github, and go get… github.com/powershell/powershell/releases
 
For MacOS, download the file that ends in .pkg, and then install as you would from any .pkg file. You’ll be pwsh-tastic in no time.
 
Couple gotchas, though:
 

  1. You need to be root to install modules. Ho hum.
 

  1. You need to trust the PSGallery repo to install modules
 

  1. You might want to update PowerShellGet while you’re there…
 
 
Starting Powershell can be then done either from the Launcher icon, or by opening a terminal window and executing ‘pwsh
 
 
Trusting the PSGallery is simples, though.
 
In your pwsh window (as root), run:
 
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
 
..wait a few seconds, then you should be able to
 
Install-Module PowerShellGet -Force
 
And also..
 
Install-Module SQLServer
 
I’m assuming something similar for Ubuntu 16.04: Get the .deb, install, trust, install-module (s), but I’ve not got that far. Too excited 🙂
 
Happy PWSHing !
 
Back soon..