This article explains how to use the PowerShell cmdlet Set-ADDomain to change an AD domain's properties or attributes. Mentioned below is a sample script using the Set-ADDomain cmdlet to set a value for AllowedDNSSuffixes attribute of the domain SaveTheWorld.com.
Import-Module ActiveDirectory
Set-ADDomain -Identity Example.com -AllowedDNSSuffixes
@{Replace="SaveTheWorld.com","Now.SaveTheWorld.com"}
To use this cmdlet to change domain name, scope or any other attribute, the script must be modified by adding the relevant attributes or settings in the script. But to manage your AD and all the accounts and objects in it, there's a far easier and simpler option compared to PowerShell - ADManager Plus.
ADManager Plus enables administrators to manage and report on Active Directory, Office 365, and Exchange from a single, unified console. It offers purpose-built Active Directory management features and comprehensive reports that simplify administration across AD, Office 365, and Exchange environments. In addition, it provides secure role-based delegation, approval-based workflows, and automation capabilities to streamline routine administrative tasks.
Advantages of ADManager Plus over PowerShell
In fact, these built-in management features allow you to manage objects and accounts in multiple platforms, in bulk, with purely GUI-based actions.
An integrated Active Directory, Office 365, Exchange, Google Workspace, and Skype for Business management tool with purpose-built features.
Get 30-day free trial.Your download should begin automatically in 15 seconds. If not, click here to download manually.
For AD User Management
For AD User Reporting
For GPO Management
For Password Management
For AD Group Management
For File Access Management
For AD Computer Management
For Office 365 Management
For Exchange Management
For Microsoft Graph PowerShell
Entra ID user management
Entra ID reporting
Entra ID group management and reporting
Entra ID domain management
Entra ID contact management and reporting
Other Entra ID tasks
For Azure AD PowerShell
Entra ID user management
Entra ID reporting
Entra ID group management
Entra ID group reporting
Entra ID domain management
Entra ID contact management and reporting
Other Entra ID tasks