darrenjrobinson / AzureADTenantID

Signed PowerShell module to lookup a domain name and return the associated Azure Active Directory Tenant ID.
4 stars 0 forks source link

Find an Azure Active Directory Tenant ID and/or Custom Domains using a registered Domain Name

PSGallery Version PSGallery Downloads

Description

Signed PowerShell module to

Features

Installation

Install from the PowerShell Gallery on Windows PowerShell 5.1+ or PowerShell Core 6.x or PowerShell.

Install-Module -name AzureADTenantID

How to use

Entra ID (AAD) Tenant ID

Get-AzureADTenantId -domain 'microsoft.com'
or
Get-EntraIDTenantId -domain 'microsoft.com'

or

'microsoft.com' | Get-AzureADTenantId
or
'microsoft.com' | Get-EntraIDTenantId

Exchange Online Domains (which usually infers EntraID (AAD) custom domains so that email and UPN matches for users.)

Defaults to WW Cloud

Get-AzureADCustomDomains -domain 'microsoft.com'
or
Get-EntraIDCustomDomains -domain 'microsoft.com'

For GCC-H use the -GCCH switch

Get-AzureADCustomDomains -domain 'microsoft.com' -GCCH
or
Get-EntraIDCustomDomains -domain 'microsoft.com' -GCCH

or

'microsoft.com' | Get-AzureADCustomDomains  
or
'microsoft.com' | Get-EntraIDCustomDomains  

Keep up to date