General commands
We can start by listing all the available commands under the Azure AD module, which can be done by using the following:
Get-Command -module AzureAD
We can view the full syntax for a command by using the Get-Help
command. As an example, we can view the full syntax for the Get-AzureADUser
command using the following:
Get-Help Get-AzureADUser
We can verify the status of Azure AD domains using the following command:
Get-AzureADDomain | fl
The preceding command helps to identify the domain verification status by referring to the value of the IsVerified
attribute.
If you are using a custom domain in Azure AD, we need to verify ownership of the domain using DNS records. If it is not verified, we can retrieve the required DNS records by using the following command:
Get-AzureADDomainVerificationDnsRecord -Name M365x562652.onmicrosoft.com | fl
In the preceding example, M365x562652.onmicrosoft.com
represents the domain name:
Figure...