The Update-MgDomain cmdlet in Microsoft Graph PowerShell allows IT administrators to update domain properties in a Microsoft Entra ID (formerly Azure AD) tenant. This cmdlet is useful for modifying domain authentication settings, setting default domains, and updating domain states without having to remove and re-add them.
Before using the Update-MgDomain cmdlet, ensure the following:
Install-Module Microsoft.Graph -Scope CurrentUser
Use the following script to update domain properties:
pdate-MgDomain
-DomainId <String>
-BodyParameter <IMicrosoftGraphDomain>
[-ResponseHeadersVariable <String>]
[-Headers <IDictionary>]
[-ProgressAction <ActionPreference>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Example 1: Set a domain as the default domain.
Update-MgDomain -DomainId "zky.com" -IsDefault $true
Example 2: Change the authentication type for a domain.
Update-MgDomain -DomainId "zky.com" -AuthenticationType "Managed"
| Parameters | Description |
|---|---|
| -DomainId | This parameter can be used to specify the domain you would like to update. |
| -AuthenticationType | This parameter can be used to update the domain authentication type. |
| -IsDefault | This parameter sets the newly added domain as the default domain. |
| -IsVerified | This parameter allows you to mark the domain as verified. |
ADManager Plus overcomes these limitations by providing a centralized, script-free interface for a seamless Microsoft 365 management and reporting experience. With automated workflows, granular delegation, and comprehensive reporting, ADManager Plus simplifies administrative tasks, enhances security, and boosts IT efficiency—without complex scripting.