This article will discuss the syntax and usage of the Add-AzureRmAccount PowerShell command with an example of how to use this command.
Table of Contents
Add-AzureRmAccount
You can use this command to add an authenticated Azure account to use for the Azure Resource Manager command requests.
Syntax of the Add-AzureRmAccount
Below is the syntax of the Add-AzureRmAccount PowerShell command.
Add-AzureRmAccount
-Environment <String>
-Subscription <String>
-Tenant <String>Example
You can execute the below Azure PowerShell command to add an authenticated Azure account to use for the Azure Resource Manager command requests.
PS C:\windows\system32>
$Account = "fewlines4biju@hotmailo.com"
$Environment = "AzureCloud"
$SubscriptionName = "Visual Studio Enterprise"
$TenantId = "5d9d690a-0310-474d-ae8b-42df2d549228"
Add-AzureRmAccount -Environment $Environment -Subscription $SubscriptionName -Tenant $TenantIdAfter executing the above command, I got the expected output as below. Check out the screenshot below for your reference.

After executing this command, there might be a chance you will face Parameter set cannot be resolved using the specified named parameters error.
Conclusion
This article discussed the syntax and usage of the Add-AzureRmAccount PowerShell command with an example of how to use this command. Thanks for reading this article !!!

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.
