Install and configure GSPS from the command line

Instead of using the configuration wizard, you can install and configure G Suite Password Sync (GSPS) from the command line.

When can I install GSPS from the command line?

You can install GSPS from the command line when using:

  • GSPS version 1.6 or later.
  • A service account for Google authentication. Learn more
  • The GSPS application's security context to query Microsoft Active Directory.

For other configuration options, go to Set up G Suite Password Sync.

Before you begin

Make sure that you've:

Important: You need to install GSPS on each of your Active Directory servers (domain controllers).

Install and configure GSPS from the command line

  1. Download GSPS. Ensure you download the correct edition for your operating system (32-bit or 64-bit).
  2. Sign in to the domain controller as a domain administrator. The account you use must be from the domain controller’s domain.
  3. Copy the GSPS software and your service account JSON file to your domain controller.
  4. From the command prompt on your domain controller, begin building the installation command.

    Start with the following command and append the arguments and parameters specified in the table below. Enter the arguments with all uppercase letters and enclose the parameters in quotation marks.

    msiexec /i gsuitepasswordsync[32|64].msi /l*vx msi_log.txt /quiet

    Note: The final version should be a single command without line breaks.

    Argument Parameter
    ADMIN_EMAIL

    The email address of your Google administrator.

    Example: ADMIN_EMAIL="admin@solarmora.com"

    BASE_DN

    (Optional) Your Active Directory domain's base distinguished name (DN).

    When this parameter is omitted, GSPS attempts to auto-detect the base DN.

    Example: BASE_DN="OU=users,DC=mydomain,DC=com".

    CREDENTIALS_FILE

    The full path to your service account JSON file.

    Note: The JSON file has a key that allows access to your Google domain. After authentication, remove the file from the system.

    Example: CREDENTIALS_FILE="c:\users\administrator\downloads\service_account.json"

    DOMAIN

    Your Google domain.

    Example: DOMAIN="solarmora.com"

    MAIL_ATTRIBUTE

    (Optional) The Active Directory attribute that has each user's Google email address.

    When this parameter is omitted, GSPS uses the default "mail" attribute.

    Example: MAIL_ATTRIBUTE="mail"

GSPS installation example

In this example, the administrator's address is admin@solarmora.com. The Active Directory base DN is OU=users,DC=mydomain,DC=com. The service account's JSON file is located on the domain controller at c:\users\administrator\downloads\service_account.json. The domain is solarmora.com. Each username is stored in Active Directory's mail attribute.

Note: This example command is a continual single line. Any line breaks visible here are for page formatting only.

msiexec /i gsuitepasswordsync64.msi /l*vx msi_log.txt /quiet ADMIN_EMAIL="admin@solarmora.com" BASE_DN="OU=users,DC=mydomain,DC=com" CREDENTIALS_FILE="c:\users\administrator\downloads\service_account.json" DOMAIN="solarmora.com" MAIL_ATTRIBUTE="mail"

Next steps

After the command successfully runs, the domain controller automatically restarts.

  1. Repeat the installation process until GSPS is installed on all of your domain’s writeable domain controllers.
  2. Tell your users to change their Active Directory passwords so they'll be synced.
  3. Restart the server.

If you need help with the installation, go to Troubleshooting GSPS.

Google, G Suite, and related marks and logos are trademarks of Google LLC. All other company and product names are trademarks of the companies with which they are associated.

Was this helpful?
How can we improve it?