DirectorySyncClientCmd manual sync error Azure AD Connect Upgrade

If you have upgraded to Azure AD Connect 1.1, manual sync won’t work anymore but I’ll show you how to fix it. If you're getting a DirectorySyncClientCmd error, you will want to read this rest of this post.

Azure AD Connect (AAD Connect) 1.1 was released last week.  I went through on how to upgrade to this version and why it’s an important release - Azure AD Connect 1.1 – How to upgrade.

​One reason to upgrade is that the Azure AD Connect 1.1 automatic sync schedule has been reduced from 3 hours to 30 minutes. This is great but there will be times when you want to run a manual sync outside of that set schedule.

DirectorySyncClientCmd error

Microsoft has changed how scheduling working in Azure AD Connect 1.1. Previously you would run the DirectorySyncClientCmd.exe command:

​DirectorySyncClientCmd.exe delta

Now with Azure AD Connect 1.1 this command won't work, mostly because DirectorySyncClientCmd.exe doesn’t exist anymore!

DirectorySyncClientCmd error

Microsoft explain this change with how scheduling is handled in AAD Connect 1.1:

In earlier releases the scheduler for objects and attributes was external to the sync engine and the Windows task scheduler or a separate Windows service was used to trigger the synchronization process.

How To Run Manual Azure AD Connect 1.1 Manual Sync

With DirectorySyncClientCmd.exe gone, it's still thankfully simple to run a manual sync.

The scheduler will by default run every 30 minutes.  It could be that you have an urgent change which must be synchronized immediately which is why you need to manually run a cycle.

The replacement for DirectorySyncClientCmd is to run is Start-ADSyncSyncCycle.  Here is how to run a delta manual sync in Azure AD Connect 1.1:

Start-ADSyncSyncCycle -PolicyType Delta

If you ever need to run a full sync

Start-ADSyncSyncCycle -PolicyType Initial

Microsoft list the reasons when a full sync is needed:

  • ​Added more objects or attributes to be imported from a source directory
  • Made changes to the Synchronization rules
  • Changed filtering so a different number of objects should be included

I ran Start-ADSyncSyncCycle from the AAD Connect server in PowerShell.

For more information check out Microsoft's page - Azure AD Connect sync: Scheduler.  I hope this post was of use, it caught us out when we upgraded.  As you can see it's simple to use the new command instead.