Get Windows Azure Active Directory Tenant ID in Windows PowerShell

Get Windows Azure Active Directory Tenant ID in Windows PowerShell

  • Comments 2
  • Likes

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

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Exactly what I needed, thanks!