Microsoft Azure Stack Hub User Account - Installation of Azure AD Module for Windows PowerShell

How to Install the Azure AD Module for Windows PowerShell

Question

You need to add a new Azure Stack Hub user account.

As you don't have an Azure subscription, you can't use the Azure portal.

Therefore, you decide to use the Azure AD Module for Windows PowerShell.

As the first step, you need to install the Microsoft Azure AD Module for Windows PowerShell.

For this purpose, you open an elevated Windows PowerShell command prompt.

Which of the following command would you run there?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

Correct Answer: C

Install-Module AzureAD is the command that should be run in the command prompt to install the Microsoft Azure AD Module.

Option A is incorrect.

Connect-AzureAD command is used after installing Microsoft Azure AD Module for sign in using your Azure AD credentials.

Option B is incorrect.

There is no command like Install-AZureADModule.

Option C is correct.

Install-Module AzureAD is the command that should be run in the command prompt to install the Microsoft Azure AD Module.

Option D is incorrect.

There is no command like Connect-AZureADModule.

Option E is incorrect.

Install-Module AzureAD is the command that should be run in the command prompt to install the Microsoft Azure AD Module.

Reference:

To know more about creating a user account using PowerShell, please visit the below-given link:

To add a new Azure Stack Hub user account, you need to install the Microsoft Azure AD Module for Windows PowerShell. You can use an elevated Windows PowerShell command prompt to install the module.

Out of the given options, the correct command to install the Azure AD module for Windows PowerShell is C. Install-Module AzureAD. This command installs the Azure AD module for Windows PowerShell from the PowerShell Gallery.

Option A. Connect-AzureAD is a cmdlet that connects an authenticated account to Azure AD. This command is used after installing the Azure AD module to authenticate to Azure AD.

Option B. Install-AzureADModule is not a valid command.

Option D. Connect-AzureADModule is not a valid command.

Option E. None of these is not a correct answer because the correct answer is C. Install-Module AzureAD.

Therefore, the correct command to install the Azure AD module for Windows PowerShell is C. Install-Module AzureAD.