By default the Azure AD connect will perform a sync every 30 minutes. To view the Sync Schedule settings like the used synccycle and when the next scheduled sync is planned, you can use the ADSync module. This module is part of the Azure AD Sync connector and is located in the C:\Program Files\Microsoft Azure AD Sync\Bin\ADSync folder.
To use the module first run the following command to import the Adsync module:
To view the sync settings of Azure AD Connect you can use the following command:
This will show the following output:
- AllowedSyncCycleInterval. The shortest time interval between synchronization cycles allowed by Azure AD. You cannot synchronize more frequently than this setting and still be supported.
- CurrentlyEffectiveSyncCycleInterval. The schedule currently in effect. It has the same value as CustomizedSyncInterval (if set) if it is not more frequent than AllowedSyncInterval. If you use a build before 1.1.281 and you change CustomizedSyncCycleInterval, this change takes effect after next synchronization cycle. From build 1.1.281 the change takes effect immediately.
- CustomizedSyncCycleInterval. If you want the scheduler to run at any other frequency than the default 30 minutes, then you configure this setting. In the picture above, the scheduler has been set to run every hour instead. If you set this setting to a value lower than AllowedSyncInterval, then the latter is used.
- NextSyncCyclePolicyType. Either Delta or Initial. Defines if the next run should only process delta changes, or if the next run should do a full import and sync. The latter would also reprocess any new or changed rules.
- NextSyncCycleStartTimeInUTC. Next time the scheduler starts the next sync cycle.
- PurgeRunHistoryInterval. The time operation logs should be kept. These logs can be reviewed in the synchronization service manager. The default is to keep these logs for 7 days.
- SyncCycleEnabled. Indicates if the scheduler is running the import, sync, and export processes as part of its operation.
- MaintenanceEnabled. Shows if the maintenance process is enabled. It updates the certificates/keys and purges the operations log.
- StagingModeEnabled. Shows if staging mode is enabled. If this setting is enabled, then it suppresses the exports from running but still run import and synchronization.
- SchedulerSuspended. Set by Connect during an upgrade to temporarily block the scheduler from running.
During normal operations this will be fine, but when you’re making changes to the Active Directory you probably want to force an sync. This can be done by performing the following commands:
Start-ADSyncSyncCycle -PolicyType Delta
This will trigger a Delta sync which will only sync changes. After the sync is triggered it will take some time before the settings processed, depending on the amount of changes. The result only indicates that the sync was triggered successfully not that it has been completed.
Start-ADSyncSyncCycle -PolicyType Initial
This will trigger a Initial sync which will sync all all settings. Just like the delta sync it will take some time before everything has been processed and will take a longer time to perform than the delta sync. The result only indicates that the sync was triggered successfully not that it has been completed.