Installing Azure CLI in VSCode

Before you Install the Extension you will need to make sure that you have the Latest version of the Azure CLI Installed. The Azure CLI can be installed on Windows, Linux and macOS, for my purpose I chose the Windows install.

Installing the Azure CLI

Install Azure CLI on Windows

Installing the VSCode Extension

  1. Make sure that you install of VSCode is up to date with the latest version.
  2. Start your VSCode application
  3. Browse to the Extensions tab and search for “Azure CLI”
  4. The Azure CLI Tools extension will show in the window
  5. Select this and Install
  6. After the Install you will need to reload the extensions

Testing the CLI is easy, Just create a file with the ext .azcli and enter the following command. Once done right click on the line and select execute in the terminal.

az login

This will log you in to the Azure Tenant

az vm list

This will list the VMs in that Tenant.