Install and configure Microsoft Azure command line interface

While deploying Access Gateway into an Microsoft Azure environment, you can use the Command Line Interface (CLI) to do numerous tasks. Command line interface commands are often easier, script-able, or support tasks not supported in the Microsoft Azure GUI.

Before you begin

Ensure that you have:

  • A Microsoft Azure account
  • Access to a supported command line environment such as Windows, Linux or Apple OSX.

Install the MS Azure command line interface

You can install the Microsoft command line interface in a variety of environments.

Important Note

Important

The Microsoft Azure CLI install process is governed by Microsoft Corporation and may change. This page is meant as a guide. Consult the Microsoft Azure documentation for details about the command line interface and similar topics.

  1. Navigate to the Microsoft Azure CLI overview page.
  2. From the Download section, select an appropriate environment.
  3. Execute the download and install scripts for your environment:
    For example on Mac OSX:
    brew update && brew install azure-cli

    On Windows 10 using powershell as administrator:

    Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'

Configure Azure environment

You must sign in to use the Microsoft Azure CLI environment. 

  1. After installing the Microsoft Azure environment, sign in using:

    az login

  2. A browser will open and direct you to the Microsoft Azure sign-in page. Sign in using appropriate credentials.
  3. On success you will see results similar to:

    You have logged in. Now let us find all the subscriptions to which you have access...
    [{ 
       "cloudName": "AzureCloud", 
       "id": "a937247b-. . . ", 
       "isDefault": true, 
       "name": "Azure subscription",
       "state": "Enabled",
       "tenantId": "f1f9fcc4-. . . ",
       "user": { 
            "name":"your.user@tld",
            "type":"user"
            }
    }]