How to use New-AzADDomainServiceReplicaSetObject in Azure Active Directory

Replica sets are groups of two domain controllers that are deployed in the same Azure region in Azure Active Directory Domain Services (Azure AD DS) managed domains. A managed domain in Azure Active Directory (Azure AD) is a cloud-based Active Directory domain that is fully managed by Microsoft. This is useful for environments where modern authentication methods can't be used or legacy applications from your on-premises environment need to be used without needing to manage the AD DS environment in the cloud. This measure provides high availability and disaster recovery when one of the designated domain controller fails in the Azure region. The replica set object contains the properties of the replica set, such as the location, subnet, and domain controller IP addresses. The New AzADDomainServiceReplicaSetObject PowerShell cmdlet allows you to create an in-memory object for a domain service replica set with the necessary parameters.

Azure PowerShell syntax

 Copied
New-AzADDomainServiceReplicaSetObject
[-Location <String>]
[-SubnetId <String>]
[-DomainControllerIPAddresses <String[]>]
Click to copy entire script

Example:

The following is an example script for creating an in-memory object for a domain service replica set with the necessary parameters in an Azure AD DS managed domain.

 Copied
$replicaSet = New-AzADDomainServiceReplicaSetObject -Location <location> -SubnetId <subnetid> -DomainControllerIPAddresses <DCip>

where <location> specifies the location of the replica set, <SubnetId> refers to the path of the subnet that the replica set will be deployed to, and <DCip> specifies the IP addresses of the domain controllers in the replica set.

Click to copy entire script

About ManageEngine ADManager Plus

ManageEngine ADManager Plus is a unified Active Directory, Microsoft 365, Exchange, and Google Workspace management and reporting solution. With ADManager Plus, you can use the following features to improve your organizational workflow:

  • 360 degree user provisioning for Azure AD and other directory services like Active Directory and Google Workspace.
  • Pre-packaged reports with built-in management actions for increased productivity of administrators.
  • Automate routine tasks like stale group cleanup, bulk user provisioning, and more.
  • Reset passwords, unlock user accounts, and create custom reports in bulk swiftly without PowerShell scripts.
  • Approval-based workflow for Azure AD management.

To learn more about ADManager Plus, click here.

Unified Active Directory, Exchange, and Microsoft 365 management and reporting solution

  Get 30-day free trial.
  • Embark on your script-free AD management, reporting, and automation journey with ADManager Plus.
  •  
  • By clicking 'Start your free trial now', you agree to processing of personal data according to the Privacy Policy.
  • Thanks
  • Your download should begin automatically in 15 seconds. If not, click here to download manually.

Related Powershell How-to Guides:

The one-stop solution toActive Directory Management and Reporting

Email Download Link