Wait. What? PowerShell on macOS? Here's how.

Brew .NET and PowerShell

Don't have homebrew? Get it at brew.sh

brew cask install dotnet

Update OpenSSL

brew install openssl

ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/

ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/

brew cask install powershell

Install Azure PowerShell modules

To download and install the Azure PowerShell module package use the following PowerShell code:

Install-Package -Name Az              

Test if the installation was successful with the cmdlet

Import-Module Az | Login-AzAccount

You should be prompted to go to https://microsoft.com/devicelogin to enter the provided code and your Azure admin credentials.

See more about the Az module here.