Get-ADSyncScheduler cmdlet missing

With the February 2016 update of the ADConnect tool, Microsoft introduced some changes in the way the scheduled sync between the on-prem AD and Azure AD works. Up until this version, the sync was controlled by a scheduled tasks, created under the root of the Windows Scheduled Tasks container. In the new versions, the scheduler is now built-in into the sync engine and controlled via the ADSync PowerShell module. Detailed information about the changes can be found in this article.

Some people have run into issues with the new model, namely in some cases the scheduler cmdlets appear to be missing. For me, this happened after I updated my lab setup to the 1.1.105.0 version. I found out about the issue few days later, after receiving the “no sync attempt registered in the past 24h” messages. Since a new version was released in the meantime, I upgraded to that one, but it didn’t seem to make a difference. After ignoring the issue for a while longer, I installed the March release as well (1.1.119.0) and since the issue was still unresolved I started investigating. Several reports for similar behavior were already submitted on different O365 communities, with no apparent fix.

So I started troubleshooting in my lab. As mentioned above, updating to the latest version didn’t seem to fix it. Neither did a clean reinstall on the AADConnect tool for that matter. Everything else seemed in order, but the Get-ADSyncScheduler cmdlet and similar were simply missing. Looking at the install logs, located under %localappdata%\AADConnect didn’t reveal anything interesting. The ADSync module was present and functioning correctly, with the exception of the scheduling cmdlets. So I went on looking at the actual module, which you can find under C:\Program Files\Microsoft Azure AD Sync\Bin\ADSync. Inside the module file, you will find a list of files and assemblies required. Suspiciously, it lacked reference to one of the DLLs located in the \Bin directory, with name that was very suggestive: Microsoft.MetadirectoryServices.Scheduler.dll. Upon adding a reference to said file, I was finally able to use the scheduler cmdlets.

In case you want to try this solution, here are the detailed steps:

  1. Browse to your AADConnect install dir, should be something like: C:\Program Files\Microsoft Azure AD Sync\Bin\ADSync
  2. In the ADSync folder, locate the ADSync.psd1 file and open it with your favorite text editor
  3. Under RequiredAssemblies, add a new line for the missing DLL. As this DLL is located under the parent directory, \Bin, make sure to prefix it with another dot: ..\Microsoft.MetadirectoryServices.Scheduler.dll
  4. Repeat the same for the FileList section
  5. Save the file and close any opened PowerShell sessions. Better yet, logoff. After logging back again, PowerShell should now recognize the AADConnect scheduler cmdlets. Hopefully 🙂
This entry was posted in Office 365. Bookmark the permalink.

One Response to Get-ADSyncScheduler cmdlet missing

  1. Hey outstanding website! Does running a blog similar to
    this take a lot of work? I have absolutely no knowledge
    of computer programming but I was hoping to start my own blog
    soon. Anyway, if you have any recommendations or techniques for new blog owners please share.
    I know this is off topic however I just wanted to ask.
    Appreciate it!

Leave a Reply

Your email address will not be published. Required fields are marked *