Microsoft 365 and PowerShell
Force a Microsoft Entra Connect sync with PowerShell
On this page
Microsoft Entra Connect Sync (called Azure AD Connect until 2023, and DirSync before that) copies users, groups and passwords from your on-premises Active Directory to Microsoft Entra ID, the directory behind Microsoft 365. It runs on its own every 30 minutes. When you’ve just created a user or changed a group and don’t want to wait, you can start a sync yourself with PowerShell.
Run it on the sync server
The commands only work on the server where Entra Connect is installed. Sign in to that server, open PowerShell as administrator, and the ADSync module loads automatically. If it doesn’t, load it with:
Import-Module ADSync
Delta sync: for everyday changes
A delta sync sends only what has changed since the last run, such as a new user, a password reset, a changed job title or a new group member. It takes seconds to a few minutes, and it’s the one you want almost every time:
Start-ADSyncSyncCycle -PolicyType Delta
Full sync: after configuration changes
A full (initial) sync re-reads every object. It takes much longer on a large directory, so only run it when:
- you’ve changed which OUs, groups or attributes are synchronised (filtering)
- synchronisation rules have been added or edited
- you’ve added a new attribute to the sync, because a delta sync won’t pick up attributes it wasn’t already copying
Start-ADSyncSyncCycle -PolicyType Initial
Check the schedule and whether it worked
Get-ADSyncScheduler
This shows whether the scheduler is switched on (SyncCycleEnabled), how often it runs, and when the next run is due (NextSyncCycleStartTimeInUTC, in UTC, so an hour behind UK time in summer). If SyncCycleEnabled is False, someone has paused it, often during an upgrade. Turn it back on with:
Set-ADSyncScheduler -SyncCycleEnabled $true
To watch a sync run, open Synchronization Service Manager from the Start menu on the same server. Each step shows its status and how many objects were added, updated or deleted, and any errors list the object that failed.
Troubleshooting
- “Sync is already running” or a busy error: a sync is already in progress. Wait for it to finish and run your command again.
- “The term ‘Start-ADSyncSyncCycle’ is not recognized”: you’re not on the Entra Connect server, or PowerShell isn’t running as administrator.
- The change still isn’t in Microsoft 365: check the object is in an OU that’s included in the sync, and look for export errors in Synchronization Service Manager. After a successful sync, some changes can take a few more minutes to show in Exchange Online or Teams.
- You use Entra Cloud Sync instead: Cloud Sync uses a lightweight agent and has no
Start-ADSyncSyncCyclecommand. Use the provisioning options for the configuration in the Microsoft Entra admin centre instead.