If you have an on premise Active Directory and you’re trying to use Microsoft Office 365 or Azure services, you’ve probably already set up Azure Entra Connect (formerly Azure AD Connect, and sometimes called Azure Entra ID Connect) on one of your servers to sync your directory.
One of the strange things about Azure Entra Connect is that there is no sync now button which means if you are making a change to your Active Directory, so if don’t have time to wait for its scheduled sync, you need to run it manually. Fortunately, forcing an Azure Entra Connect sync is not difficult:
There are a few small things you need to do before syncing and while they may be obvious to some, they are not obvious to all, so we list them:
Import-Module -Name "C:\Program Files\Microsoft Azure AD Sync\Bin\ADSync" -Verbose
You have two choices when sync’ing Azure Entra Connect:
A delta sink copies any changes that have been made since the last sync and only those changes. This is almost certainly the one you want to use:
Start-ADSyncSyncCycle -PolicyType Delta
You can complete a full sync of your entire Active Directory (which will take time and is very likely unnecessary), using this command:
Start-ADSyncSyncCycle -PolicyType Initial
As you can see in the screenshots above the PowerShell command line will respond with SUCCESS, but that does not mean the sync has completed; it only means the sync has started.
To see if the sink has completed successfully you need to launch the synchronization service program as an administrator and then drill into it.
Here are some other completely self-explanatory AZURE ENTRA AD commands, you might find handy:
Set-ADSyncScheduler -SyncCycleEnabled $false
Set-ADSyncScheduler -SyncCycleEnabled $true
Set-ADSyncScheduler -CustomizedSyncCycleInterval d.HH:mm:ss
So if you want Azure and your on-premise domain to sync every 45 minutes, use this command
Set-ADSyncScheduler -CustomizedSyncCycleInterval 00:45:00
Note that the Azure Entra Connect Sync:
This website uses cookies.