March 31, 2019 · PowerShell Azure

Control Azure with PowerShell Core on macOS

1. Install PowerShell Core

The easiest way to do this is with Homebrew:

$ brew cask install powershell

You can also download an installer, which you can read about on Microsoft Docs. Once PowerShell Core is installed, you can run it from within Terminal by using the pwsh command:

$ pwsh

2. Install the Azure module

Simply run:

PS> Install-Module Az

3. Enjoy!

Once you have imported the Azure module, you can connect to your Azure account with the following command:

PS> Add-AzAccount

An overview of the commands can be found at Microsoft Docs:

  • LinkedIn
  • Tumblr
  • Reddit
  • Google+
  • Pinterest
  • Pocket