Condividi tramite


[Reference] How to execute initial or delta sync via command-line

Overview

If you un-check the box in the configuration wizard to prevent the initial synchronization from happening, you can fire the initial synchronization using DirectorySyncClientCMD.Exe.

File:

  • DirectorySyncClientCmd.Exe

Location:

  • %programfiles%\Microsoft Azure AD Sync\Bin
  • %programfiles%\Microsoft Azure AD Connection Tool

Arguments

    • Initial – (DirectorySyncClientCMD Initial)
      • This will run through the steps to execute the initial synchronization to the cloud.
      • Executes the following:
    • Full Import (Stage Only) on all connectors
    • Delta Import (Stage Only) on all connectors
    • Delta Synchronizaiton on all AD connectors
    • Export, Delta Import and Delta Synchronization on WAAD Connector
    • Export on all AD Connectors
    • Delta - (DirectorySyncClientCMD Delta)
      • This will run through the steps to execute a delta synchronization to the cloud
      • Executes the following:
        • Delta Import (Stage Only) on all connectors
        • Delta Synchronization on all AD connectors
        • Export, Delta Import and Delta Synchronization on WAAD Connector
        • Export on all AD Connectors

Comments

  • Anonymous
    January 01, 2003
    Run the following :
    DirectorySyncClientCmd.exe initial
  • Anonymous
    January 01, 2003
    If AADsync is using OU filtering and OUs are added or removed, is an initial or delta synchronization required? In DirSync, changes such as OUs would required a full import/full sync.
  • Anonymous
    September 26, 2014
    How to force full sync if required
  • Anonymous
    March 31, 2015
    Would love to know why the initial switch only appears to work once and then afterwards only runs a delta even when the parameter is specified. Any time a change is made to OU selection or scope filters a full sync is necessary.
  • Anonymous
    March 31, 2015
    This is an excellent article! If you have a business, search engine optimization is a must. Find out how we can help you by visiting our website: interactivesearchmarketing.com
  • Anonymous
    July 27, 2015
    The comment has been removed
  • Anonymous
    October 20, 2015
    why can I not run this from a remote PSSession?
    Server A has the AADConnect Files and Services and I'm trying to run the Command from within a PSScript on Server B
  • Anonymous
    October 22, 2015
    Hi TomMorris, how do you run the command remotely from the PShell script? I have a script that does the same thing and I use . In the script block I first CD to C:Program FilesMicrosoft Azure AD SyncBin, and only then I run ".DirectorySyncClientCmd.exe delta" command to initiate the delta sync.
    As an example this is how I implemented the PShell cmdlet:
    Invoke-Command -ComputerName AADSyncMachine.fqdn -ScriptBlock {cd "C:Program FilesMicrosoft Azure AD SyncBin"; .DirectorySyncClientCmd.exe delta} -Credentials (Get-Credentials)
  • Anonymous
    November 15, 2015
    Hi, may I know what will happen if in the Task Scheduler, it shows that only DirectorySyncClientCmd.exe is specified without any argument ?