December 31st, 2013

Get Windows Azure Active Directory Tenant ID in Windows PowerShell

Doctor Scripto
Scripter

Summary: Get your Windows Azure Active Directory tenant ID in Windows PowerShell.

Hey, Scripting Guy! Question How can I get my Windows Azure Active Directory tenant ID in Windows PowerShell?

Hey, Scripting Guy! Answer Use the Add-AzureAccount cmdlet to add your Windows Azure account to Windows PowerShell:

PS C:> Add-AzureAccount

          Then use Get-AzureAccount to get the tenant ID:

PS C:>(Get-AzureAccount).ActiveDirectories.ActiveDirectoryTenantID

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.