Skip Navigation LinksFor-Synchonization-all-Verions

​​How to Force the Directory Synchronization for all versions AAD Connect / AAD Sync Sync and Directory Synchronization Tool (DirSync)

 

To Enable Synchronization in a tenant using PowerShell, connect to O365 MSODS PowerShell Module

Connect-MsolService

 

Set-MsolDirSyncEnabled –EnableDirSync $true

Get-MsolCompanyInformation |FL *Sync*

MSOnline\Get-MsolDirSyncConfiguration |FL

MSOnline\Get-MsolDirSyncFeatures |FL

Get-MsolDirSyncProvisioningError

 

To verify the Synchronization status from Classic version Office 365 Admin Center:

https://portal.office.com/Admin/Default.aspx?switchtoclassic=true#@/DirSync/ManageDirectorySynchronization.aspx

 

To verify the Synchronization status from Preview version of Office 365 Admin Center:

https://portal.office.com/AdminPortal/Home?switchtomoderndefault=true#/dirsyncmanagement

 

To collect the AAD Connect Installation logs logging:

%localappdata%\AADConnect

 

Windows + R

 

Download the latest version of AAD Connect here : http://aka.ms/aad-connect

Download the Office 365 Sign in Assistant here : http://aka.ms/o365-sia

Download the Office 365 PowerShell Module here : http://aka.ms/o365-psh

Using SirSync Config Shell:

 

 

You can change between Enabled and Disabled with Set-ADSyncAutoUpgrade. Only the system should set the state Suspended.

From Local PowerShell as Administrator run:

Set-ADSyncAutoUpgrade -AutoUpgradeState Enable

https://azure.microsoft.com/en-us/documentation/articles/active-directory-aadconnect-feature-automatic-upgrade/

 

The MSI file is actually a newer version 1.1.180.0 (released May 2016).

https://azure.microsoft.com/en-us/documentation/articles/active-directory-aadconnect-version-history/

 

 

In this new version, the DirectorySyncClientCmd.exe is no longer available and a scheduled task is no longer used to trigger the sync process. Instead we are switching back to the PowerShell commandlets

 

Get-ADSyncScheduler

Set-ADSyncScheduler

Start-ADSyncSyncCycle -PolicyType Delta

Start-ADSyncSyncCycle -PolicyType Initial

 

https://azure.microsoft.com/en-us/documentation/articles/active-directory-aadconnectsync-feature-scheduler/  ​

 

 

 

 Prepare to provision users through directory synchronization to Office 365

https://support.office.com/en-us/article/Prepare-to-provision-users-through-directory-synchronization-to-Office-365-01920974-9e6f-4331-a370-13aea4e82b3e?ui=en-US&rs=en-US&ad=US



 

Version AAD Sync from the command prompt?

To run AAD Sync from the command prompt, you can use a tool called DirectorySyncClientCmd.

You can find the tool in the follow​ing folder: %ProgramFiles%\ Microsoft Azure AD Sync\Bin

The tool supports the following options:

initial

delta

 

From: http://msdn.microsoft.com/en-us/library/azure/dn783460.aspx

Create a desktop icon in the desktop for "DirectorySyncClientCmd - Shortcut"

image006.png
 

"C:\Program Files\Microsoft Azure AD Sync\Bin\DirectorySyncClientCmd.exe"

image007.jpg
 

To Force Delta Synchronization, double click "DirectorySyncClientCmd - Shortcut"

It will automatically force the synchronization:

image008.png
 

 

  • Perform a Full Sync: on the Connectors tab, right-click SourceAD, click Run,

http://msdn.microsoft.com/en-us/library/azure/dn801051.aspx 

image009.png
 

 

Click Full Synchronization, and then click OK.

image010.png
 

How to start a Full synchronization using Command Prompt:

Type:

CD C:\Program Files\Microsoft Azure AD Sync\Bin

image011.jpg
 

Run :

DirectorySyncClientCmd.exe Initial​

image012.jpg
 

The Initial will synchronize complete Full Synchronization:

image013.png
 

 

Intermediate Version

From DirSync open local PowerShell (powershell.exe).

image002.jpg
 

Run the command Import-Module DirSync

image003.jpg
 

To force using Full Synchronization run:

Start-OnlineCoexistenceSync –FullSync​

image004.jpg
 

To force using Delta Synchronization run:

Start-OnlineCoexistenceSync

Start-OnlineCoexistenceSync​

image005.jpg
 


 

Old DirSync version

PS C:\Program Files\Windows Azure Active Directory Sync> Start-OnlineCoexistenceSync -FullSync

image001.jpg