How to move Azure AD Connect to another computer

Good afternoon!

Synchronizing an on-premises Active Directory with Azure Active Directory requires a "Directory Synchronization Service Account". This account is created automatically and looks like this:

The computer where AD Connect is installed is named DC1. If you decide to move AD Connect to DC2, another account will be created. The old one, however, won't be deleted.

How do you delete it? It's simple:

PS C:\> Install-Module -Name AzureAD
...
PS C:\> Connect-AzureAD
...
PS C:\> Get-AzureADDirectoryRole | where {$_.DisplayName -eq "Directory Synchronization Accounts"} | Get-AzureADDirectoryRoleMember

ObjectId                             DisplayName                                           UserPrincipalName
--------                             -----------                                           -----------------
4f183fac-8285-47ef-91b5-dd236c6b0df5 On-Premises Directory Synchronization Service Account Sync_DC1_259edc3a9704@...
c086e765-6a33-4a86-bbaa-d26017a69c0a On-Premises Directory Synchronization Service Account Sync_DC2_259edc3a9704@...

PS C:\> Remove-AzureADUser -ObjectId 4f183fac-8285-47ef-91b5-dd236c6b0df5

Only registered users can leave a comment.

Sign in or register to leave a comment.