Chapter 21 Installing Azure PowerShell Module & Azure CLI

This Chapter covers following Topic Lessons

  • Azure PowerShell Module
  • Azure CLI

This Chapter covers following Lab Exercises

  • Install latest Version of PowerShellGet
  • Install & Import Azure PowerShell Module
  • Connecting to Azure using Azure PowerShell Module

Azure PowerShell

Azure PowerShell provides a set of cmdlets that use the Azure Resource Manager model for managing your Azure resources. You can use it in your browser with Azure Cloud Shell, or you can install it on your local machine and use it in any PowerShell session.

Exercise 176: Install latest Version of PowerShellGet

  1. Open PowerShell in your Windows 10 Desktop and run following command.

  2. Install-Module PowerShellGet -Force

    Screenshot_736
  3. Set the PowerShell execution policy to RemoteSigned.

    Screenshot_737

Exercise 177: Install & Import Azure PowerShell Module

  1. Install-Module -Name AzureRM â€"AllowClobber

  2. Import-Module -Name AzureRM

    Screenshot_738

Exercise 178: Connecting to Azure using Azure PowerShell Module

  1. On your desktop open Windows PowerShell App. Just type Powershell in search box and you can see Windows PowerShell App.

  2. Connect-AzureRmAccount

  3. This will open a browser for connecting to Azure. Enter Subscription username and password for connecting to Azure.

    Screenshot_739
  4. After you have successfully authenticated to Azure through Browser, The Powershell window will now show Azure information as shown below.

    Screenshot_740
  5. You can also confirm above by running following command. Get-AzureRmSubscription

    Screenshot_741

Azure CLI

The Azure CLI is a command-line tool for managing Azure resources. The CLI is designed to make scripting easy, query data and support long-running operations. Azure CLI is installed via an MSI.

Note: You have the option of using Azure CLI Cloud Shell in Azure Portal instead of installing Azure CLI on Windows Machine.

Exercise 179: Install Azure CLI on Windows Machine

Download and Install Azure CLI MSI Installer
https://aka.ms/installazurecliwindows

Accessing Azure CLI
You can access Azure CLI through the Windows Command Prompt (CMD).

Exercise 180: Login to Azure with CLI

  1. Open windows CMD> az login. This will open a browser. Enter your azure subscription Username and password credentials.

    Screenshot_742
  2. After you have successfully authenticated to Azure through Browser, The CMD window will now show Azure information as shown below.

    Screenshot_743
UP

LIMITED OFFER: GET 30% Discount

This is ONE TIME OFFER

ExamSnap Discount Offer
Enter Your Email Address to Receive Your 30% Discount Code

A confirmation link will be sent to this email address to verify your login. *We value your privacy. We will not rent or sell your email address.

Download Free Demo of VCE Exam Simulator

Experience Avanset VCE Exam Simulator for yourself.

Simply submit your e-mail address below to get started with our interactive software demo of your free trial.

Free Demo Limits: In the demo version you will be able to access only first 5 questions from exam.