Install the module and connect to the Azure Administrator Account

This first procedure walks you through installing the module, the services, and then connecting to the Azure Administrator account. Make sure you have Windows PowerShell 7.0 or later installed. For details, refer to PowerShell—Verify version and update.

  1. Open a Windows PowerShell (7.0 or later) window, and at the prompt, enter the command to install the Azure Account: Install-Module -Name Az.Accounts -Force.

  2. At the prompt, enter the command to install Microsoft Graph: Install-Module Microsoft.Graph -Scope CurrentUser.

  3. At the prompt, enter the command to install Microsoft Online Management: Install-Module ExchangeOnlineManagement -Scope CurrentUser.

  4. At the prompt, enter the command to connect to Azure: Connect-AzAccount.

  5. In the sign-in dialog, select the account you want to sign in with, and complete the sign-in procedure.

  6. Azure will retrieve the subscriptions available on the tenant, and provide you with the name as in the example below.

    Response with tenant name.png

Install the Azure Resources

After connecting to Microsoft Azure, install the Azure resources module if it isn't already installed.

  1. At the prompt, enter Install-Module Az.Resources.

  2. When you are asked whether to trust the source and want to continue, enter Y.