Run migrations from the command line

G Suite Migration for Microsoft Outlook

As an alternative to using the G Suite Migration for Microsoft Outlook (GSMMO) product, you can run a migration using the command line. End users can import their own data or administrators can migrate data for their users with these arguments.

Run your migration using the arguments and parameters shown below. Precede each argument by a double dash (--) and enclose all parameters in double quotes. Enter the command on a single line.

Arguments

For this argument... Supply this parameter Description
--help No parameter required. Displays a list of arguments for ClientMigration.exe.
--crash_reporting No parameter required. Automatic crash reports are submitted to Google. Learn more

See also --nocrash_reporting.

--email_migration_start_date Date in YYYY-MM-DD format. All messages before this date are excluded from migration.
--email_migration_end_date Date in YYYY-MM-DD format. All messages after this date are excluded from migration.
--exclude_top_level_folders Comma-separated list of top-level folders to exclude. Specifies top-level folders to exclude from migration.
--force_restart No parameter required. Remigrates all items, instead of just the items not successfully migrated.
--google_email Email address of Google Workspace user to where data is migrated. Required.
--migrate_deleted No parameter required. Migrates messages in the Deleted items folder.
--migrate_junk No parameter required. Migrates messages in the Junk email folder.
--nocrash_reporting No parameter required. Automatic crash reports are not submitted to Google. Learn more

See also --crash_reporting.

--noenable_calendar_migration No parameter required. Runs the migration without including calendar data.
--noenable_contact_migration No parameter required. Runs the migration without including contact data.
--noenable_email_migration No parameter required. Runs the migration without including email data.
--noenable_label_prefix No parameter required. Applies when migrating mail from PST files, or from Outlook profiles with multiple accounts.

From PST files—It doesn't include the PST filename as a prefix in Gmail labels created for messages migrated from Outlook folders.

From Outlook profiles with multiple accounts—It doesn't include the username as a prefix in Gmail labels created for messages migrated from Outlook folders in the non-primary accounts of the profile.

--nouse_gui No parameter required. Runs the utility from the command line, without a GUI. Otherwise, GUI mode is the default.
--nowait No parameter required. Closes the utility without waiting for the Enter key when run from the command line.
--profile_name Microsoft Outlook profile from where data is migrated. Required unless you use the pst_file_names argument (below).
--pst_file_names List of fully qualified PST filenames from where data is migrated, separated by "|" (the pipe character). Required unless you use the profile_name argument (above).

Note: Always surround the PST filenames in double quotes. View the example below.

Examples

  1. Migrate all emails (plus all calendars and contacts) created after February 15, 2020 from an Outlook profile named "outlook-profile-name" to the Google Workspace username "user@altostrat.com", without using the GUI.

    ClientMigration.exe --profile_name="outlook-profile-name" --google_email="user@altostrat.com" --nouse_gui --email_migration_start_date="2020-02-15"

  2. Migrate only emails and contacts (no calendars) from PST files named “c:\pst\archive1.pst” and “c:\pst\archive2.pst” to the Google Workspace username user@altostrat.com, without using the GUI. The command exits when done, without waiting for the Enter key.

    ClientMigration.exe --pst_file_names="c:\pst\archive1.pst|c:\pst\archive2.pst" --google_email="user@altostrat.com" --noenable_calendar_migration --nouse_gui --nowait

Administrator-only argument

For this argument... Supply this parameter Description
--service_account_json_path The path to the service account JSON file. Needed if you intend on repeating an unattended migration multiple times.

For details on how to obtain this file, go to Create a service account.

Note: G Suite Migration for Microsoft Exchange (GSMME) might be an easier way to run unattended migrations or to migrate PST files from several different users. Learn more

Example

Migrate all emails (plus all calendars and contacts) created after February 15, 2020 from an Outlook profile named "outlook-profile-name" to the Google Workspace username "user@altostrat.com", without using the GUI. Use the service account credentials stored in C:\Users\admin\service_account.json (instead of prompting the user for access).

ClientMigration.exe --profile_name="outlook-profile-name" --google_email="user@altostrat.com" --nouse_gui --email_migration_start_date="2020-02-15" --service_account_json_path="C:\Users\admin\service_account.json"


Google, Google Workspace, 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?

Need more help?

Sign in for additional support options to quickly solve your issue