Updating Microsoft Entra ID domains using Microsoft Graph PowerShell

What is the Update-MgDomain cmdlet?

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.

Modifying domain properties using Graph PowerShell

Prerequisites

Before using the Update-MgDomain cmdlet, ensure the following:

  • The Microsoft Graph PowerShell module is installed. If not, install it using this script:
    Install-Module Microsoft.Graph -Scope CurrentUser
  • Connect to Microsoft Graph PowerShell with the required permissions.
  • Ensure you have administrative privileges to modify domain properties.

Using the Update-MgDomain cmdlet

Use the following script to update domain properties:

pdate-MgDomain
-DomainId <String>
-BodyParameter <IMicrosoftGraphDomain>
[-ResponseHeadersVariable <String>]
[-Headers <IDictionary>]
[-ProgressAction <ActionPreference>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]

Examples

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"

Supported parameters

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.

Limitations of using Graph PowerShell scripts to manage and report on Microsoft Entra ID

  • Graph PowerShell lacks a user-friendly GUI, making reporting and management hard to track and visualize.
  • Running PowerShell scripts requires elevated permissions, restricting accessibility to only authorized personnel.
  • Generating detailed reports requires scripting expertise, making it difficult to retrieve insights quickly.

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.

Streamline Microsoft 365 management and reporting using ADManager Plus

  • Create and manage Microsoft 365 objects in bulk from an intuitive interface with just CSV files.
  • Generate comprehensive reports on Microsoft 365 objects such as users, groups, and contacts, and manage them on the fly.
  • Automate routine management tasks such as user provisioning, license management, and group membership management.
  • Delegate tasks to IT technicians without elevating their privileges in Microsoft 365.
  • Identify risky objects in your Microsoft 365 environment and proactively manage them.

Simplify Entra ID management and reporting with ADManager Plus

 
  • What is the Update-MgDomain cmdlet?
  • Update Entra ID domain properties using Graph PowerShell
  • Limitations of using Graph PowerShell scripts to manage and report on Microsoft Entra ID
  • Streamline Microsoft 365 management and reporting using ADManager Plus
The one-stop solution to Active Directory Management and Reporting
Email Download Link