Forcing DirSync from a remote computer

By default DirSync will run a delta copy of your Active Directory to Azure/Office 365 every 3 hours. You can, of course, log into the DirSync server and force it to run at any time. While this is a perfectly acceptable solution, it would be a better solution if there was a way to force DirSync to run without having to log into the DirSync server. As it happens, PowerShell does provide us with a way to do this.

Invoke-Command {Add-PSSnapin Coexistence-Configuration;Start-onlinecoexistencesync} –ComputerName <Dirsync Server Name>

You’ll need to run that command within PowerShell, and with an account that has permissions to log into the DirSync server and force a Sync to run.