Run a sync with the command line

After July 1, 2022, we no longer support School Directory Sync (SDS). Instead, use the Student Information System (SIS) roster report. Learn more

You can run synchronizations in Google School Directory Sync (SDS) from the command line. You can incorporate syncs into any scheduling or batch script you use. You can perform a range of actions, such as:

  • Read a specified file.
  • Ensure that a sync is not already running.
  • Generate a list of changes.
  • Apply any changes.

Use the command line to run a sync

  1. Enter the sync-cmd [argument] file name command on a single line.
  2. Replace file name with the name of the XML file that you created in Configuration Manager.
  3. Customize your sync using any of the arguments listed below.

Note: If you run the command without any arguments, you’ll get an error message directing you to run sync-cmd-sds -h for help.

Customize your sync

sync-cmd command arguments

You can also access this information by running the sync-cmd-sds -h command in the directory where SDS is installed.

Argument Description

Use this to apply any detected changes. If you don’t use this tag, a sync is run as a test only and no changes are made to your G Suite account. For the best results, run a test without this argument before running a sync with it.

-c,--config file name

Use this to specify the configuration file to load. The sync won’t happen unless you specify a valid XML file with this argument.


Use to omit any configured deletion limits.


Clears the cache. Improper use can cause performance degradation. Don't use this option unless directed to do so by support.


Excludes groups from the sync. Use this option if you want to sync users, but not groups.


Displays help information.

-l,--loglevel value

Use this to override the default or configured log level with a specified value. Valid values (in increasing order of detail) are FATAL, ERROR, WARN, INFO, DEBUG, and TRACE. In most cases, the recommended log level is INFO.


Restricts the running syncs to one instance per configuration file. Only valid with -a.


Use this to exclude organizational units from the sync.


Writes reports to a specified output file in addition to writing them to the log.


Use this to exclude users from the sync. Use this option if you want to sync groups, but not users.


Displays short application-version information.


Displays detailed application-version information, but does not synchronize it.

Related topics

Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue

Clear search
Close search
Google apps
Main menu
Search Help Center