Friday, June 16, 2023

Installing VS Code, PowerShell, Azure PowerShell, and AZ CLI on macOS

 It's relatively simple to get these tools installed on a Mac so you can start working with Azure and ARM templates via code.

This article just collects the relevant information and puts it in order:

Visual Studio Code

This can be installed as a regular app in macOS, follow the link: 


Homebrew is a package manager for macOS and Microsoft's recommended way af installing PowerShell and other tools.

The commands to run for Homebrew are:

/bin/bash -c "$(curl -fsSL"

When Homebrew has been installed, it will ask you to run two additional commands (to add Homebrew to you PATH), these are:

(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/<REPLACE WITH USER>/.zprofile

eval "$(/opt/homebrew/bin/brew shellenv)"


To install PowerShell follow the same link as above:

Or run the following commands:

brew install --cask powershell

And to run PowerShell from the terminal:


Azure PowerShell

To install Azure PowerShell, follow this link:

Or run this command:

Install-Module -Name Az -Repository PSGallery -Force

This will give you the Azure related commands such as:

Connect-AzAccount, Get-AzContext, Set-AzContext, etc 


To install, follow this link:

Or run:

brew update && brew install azure-cli

This gives you all the AZ commands. A separate Az login is required to use the Az commands in Azure.


To install, see link or run below two commands:

brew tap hashicorp/tap

brew install hashicorp/tap/terraform

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.