Azure - CLI 2.0(Latest) - Setup on MacOS

Problem Definition

How to use Azure commands using Command Line Interface on MacOS.

Prerequisites

You need to have homebrew set up on you Mac. Homebrew is a package manager which is very handy in order to get you what you need or you are missing. If you don't already have home brew on you Mac please user this  link and set up homebrew.

Introduction to Azure CLI

Azure CLI is Microsoft's cross-platform command line tool for managing resources in Azure. Azure CLI comes with capability of effectively managing and administering Azure resources from command line and build automation scripts using that. Version in question here is Azure CLI 2.0.

How can I set it up

Please run a test in bash by typing "az" on your terminal. If you don't have Azure CLI on your Mac you will receive an error like the following:


Now to set it up please type following in your command window.

brew update && brew install azure-cli

It will then take some time and on successful installation you will get confirmation as following on your command line:




Confirmation

Try to run "az" again on your terminal, output like following will confirm you have successfully installed Azure CLI on your Mac. This also confirms you are ready to manage your Azure resources from your MacOS using your favourite scripting.




Comments

Popular posts from this blog

Azure - Manage Blob Storage - Part #7 - Add Metadata to an Existing Container using C#

Azure - Manage Blob Storage - Part #5 - Create Folder Structure and upload a file to folder using an Existing Container using C#

Algorithm - Breadth First Search(BFS) - Python(3)