Friday, July 25, 2014

How to manually force a Directory Synchronization with the new DirSync tool

In the latest release of the Windows Azure Directory Synchronization tool (aka DirSync), the way we manually force a directory synchronization has changed.

In previous versions, we had to navigate to the location where DirSync was installed, launch DirSyncConfigShell.psc1 (PowerShell Console) and then run the Start-OnlineCoexistenceSync cmdlet:
However, in this latest version this console file does not exist anymore:
So how do we manually force a directory synchronization now?! Well, DirSync cmdlets are now part of a PowerShell module named DirSync. As such, simply lunch a PowerShell console with administrative rights, import this module and run the usual Start-OnlineCoexistenceSync cmdlet. Simple as that!
This change, however, will obviously break any scripts you might have developed, but it shouldn’t be hard to update them.

As expected, if you try to import this module in an older version of DirSync, you will get the following error as the module does not exist:
If we try to list all the cmdlets available in this module, we actually don’t receive anything back:
So where are all the DirSync PowerShell cmdlets we had in previous versions?! Not to worry. The DirSync module is actually just a wrapper which calls “%programfiles% \Windows Azure Active Directory Sync\DirSync\DirSync.psd1”. As such, if we want to list all the cmdlets, we have to check the Microsoft.Online.Coexistence.PS.Config module instead:
Unfortunately not all of these cmdlets are fully documented yet, but we can guess what most of them do based on their name anyway.
In my opinion, this change is more than welcomed as it makes life a lot easier!

No comments:

Post a Comment