High School

Which PowerShell cmdlet is used to authenticate to your Azure subscription?

A. AD-Login
B. Connect-AZAccount
C. Authenticate-AzAccount
D. Az-Login

Answer :

Final answer:

The correct PowerShell cmdlet to authenticate to your Azure subscription is Connect-AZAccount (option b).

Explanation:

The correct PowerShell cmdlet to authenticate to your Azure subscription is Connect-AZAccount. This cmdlet allows you to securely sign in to your Azure account and access your subscription resources.

Here is a step-by-step explanation:

  1. Open PowerShell on your computer.
  2. Type the command Connect-AZAccount.
  3. A login window will appear where you can enter your Azure account credentials.
  4. After entering your credentials, PowerShell will authenticate to your Azure subscription, and you will be able to manage your resources through PowerShell.

Hence, the answer is option b.