Run GSMME from the command line
In addition to using G Suite Migration for Microsoft® Exchange (GSMME) on your Windows desktop, you can run GSMME using the command-line interface.
How to enter the commands
- Open a command prompt (CMD) window.
- Use the
cd
command and navigate to the location of the GSMME installation. For example:cd "C:\Program Files\Google\G Suite Migration"
The default location for the installation is C:\Program Files\Google\G Suite Migration. On a 64-bit system, the path is C:\Program Files (x86)\Google\G Suite Migration.
- Enter the commands.
- Each argument is preceded by a double dash (--).
- All parameters must be enclosed in double quotes.
- The command should be entered on a single line.
- Make sure you enter all the required commands for your legacy environment. The table below details all GSMME arguments, both required and optional.
- If required, you will be presented with the Microsoft Windows® dialog box asking for the Exchange administrator user name and password.
Required commands
Make sure you include the required commands for your legacy environment:
Migrating from Microsoft Exchange using an administrator profileExchangeMigration.exe
--nouse_gui
--exchange_profile_name="Exchange admin profile"
--filename="filename containing user list"
--service_account_json_path="json file path"
--gsuite_admin="admin email address"
--google_domain="domain.com"
ExchangeMigration.exe
--nouse_gui
--source_server="exchange-server hostname"
--exchange_admin_login="Exchange server admin account"
--filename="filename containing user list"
--service_account_json_path="json file path"
--gsuite_admin="admin email address"
--google_domain="domain.com"
ExchangeMigration.exe
--nouse_gui
--enable_imap
--filename="filename containing user list"
--service_account_json_path="json file path"
--imap_security=<0|1|2>
--imap_port="port number"
--imap_path_prefix="path prefix"
--imap_server_type="server type"
--source_server="IMAP server hostname"
--gsuite_admin="admin email address"
--google_domain="domain.com"
For administrator-mode migrations from Cyrus also use:
--imap_admin_id="Cyrus IMAP admin"
--imap_admin_password="Cyrus admin password"
ExchangeMigration.exe
--nouse_gui
--pst_base_folder="PST folder name"
--filename="filename containing user list"
--service_account_json_path="json file path"
--gsuite_admin="admin email address"
--google_domain="domain.com"
For details, see Migrate data from PST files.
All GSMME commands
This table details all the possible GSMME arguments.
Argument | Supply this parameter |
---|---|
--calendar_migration _end_date |
Date in YYYY-MM-DD format. Example: --calendar_migration_end_date="2017-01-01" Specify the end date of calendar events you want to migrate. For example, if you put 2017-01-01, no events that take place after January 1, 2017 will be migrated. |
--calendar_migration _start_date |
Date in YYYY-MM-DD format. Example: --calendar_migration_start_date="2015-01-01" Calendar events within the date range that start or have an event recurrence within the range will be migrated. |
--custom_label_prefix |
Prefix to attach to label. Example: --custom_label_prefix="migrated-" Specify the prefix to attach to all labels. |
--email_migration _end_date |
Date in YYYY-MM-DD format. Example: --email_migration_end_date="2017-01-01" All messages after this date are excluded from the migration. |
--email_migration _start_date |
Date in YYYY-MM-DD format. All messages before this date are excluded from the migration. |
--enable_calendar _fanout |
No parameter required. Enables calendar event fan-out for calendar migration. |
--enable_hidden |
No parameter required. Enables hidden MAPI (Exchange/PST) folder migration. |
--enable_imap |
No parameter required. Enables migration from an IMAP server rather than from an Exchange server. |
--enable_mbox_logging |
No parameter required. If you enable mbox logging, GSMME writes any user messages that can't be migrated due to file size or type restrictions to a user-specific mbox file. The mbox content is located in the "mbox" folder in the GSMME trace logging folder path (for example, %localappdata%\Google\G Suite Migration\Tracing\ExchangeMigration\mbox\user@domain.com.mbox). |
--enable_public_folder |
No parameter required. Enables GSMME migration from Exchange public folders to Google Groups. See Migrate public folders with GSMME for details. Note: You can't run a migration for both users and public folders at the same time. |
--enable_resource _migration |
No parameter required. Enables calendar resource migration. |
--exchange_admin_login |
The login name for the Exchange server administrator account. Example: --exchange_admin_login="administrator" Use this argument in conjunction with: |
--exchange_profile_name |
The name of an existing Outlook profile you want to use to connect to your Exchange Server. Example: --exchange_profile_name="exch_migration_admin" This should be an administrator profile on the same machine that runs GSMME. If you use this argument, don't use: |
--exclude_message_ classes |
Comma-separated list of classes to exclude (no spaces between list items). Example: --exclude_message_classes="ipm.note.eas,ipm.note.1" This command allows administrators to exclude messages from being migrated from Exchange to G Suite based on their message class. This command is useful when stubbed messages from an archiving solution need to be excluded. GSMME doesn't support the remigration of unstubbed messages. The recommended approach is to exclude stubbed messages using this command.Then, once the stubbed messages are fully rehydrated, migrate these in a second run of GSMME.
|
--exclude_top_level _folders |
Comma-separated list of top-level folders to exclude from migration (no spaces between list items). Example: --exclude_top_level_folders="Deleted Items,Drafts" |
--filename |
Path to the CSV file of user names you want to use for this migration. If you use this argument, don't use --migration_usernames. |
--force_restart |
No parameter required. Reruns the migration on all items, rather than only on items that weren't successfully migrated. By default, if a migration was interrupted, the next migration starts at the point where the previous migration stopped. You can use this parameter to run the migration again from the beginning. |
--gsuite_admin |
Nominated event owner for resource calendars. Example: --gsuite_admin="admin@example.com" Use this flag when performing calendar resource migrations. If an event doesn't have an owner, GSMME will set the G Suite administrator as the event owner. This user must have full access to resource calendars. |
--google_domain |
The G Suite domain to which you are migrating data. Example: --google_domain="example.com" |
--help |
No parameter required. Displays a list of the arguments for ExchangeMigration.exe. |
--id_mapping_file |
File with the complete mapping list. Examples: --id_mapping_file="resources.csv" Use the CSV mapping file which contains user and/or calendar address mappings. |
--imap_admin_id |
IMAP administrator's email address. Example: --imap_admin_id="admin@example.com" This specifies the IMAP administrator who has access to all IMAP accounts on the server. Use this for Cyrus IMAP admin migrations. |
--imap_admin_password |
IMAP administrator's password. Example: --imap_admin_password="password" Use with --imap_admin_id.
|
--imap_path_prefix |
The path where user folders are stored on an IMAP server. Example: --imap_path_prefix="INBOX" Enter the IMAP folders' path prefix that is common to all folders. This usually is the IMAP namespace for the folder names. For example, if the IMAP folder listing for a user is:
and so on, then INBOX is the path prefix. Typical values of path prefix are:
|
--imap_port |
The port number for the IMAP server. Example: --imap_port="143" |
--imap_security |
The one-digit code for the security option you want to use. Example: --imap_security="1" Use one of the following codes:
|
--imap_server_type |
The type of IMAP server from which you are migrating data. Server types are: Exchange, GroupWise, Gmail, Cyrus, Courier, Dovecot, Zimbra, and unsupported. The default is unsupported. Example: --imap_server_type="Gmail" Note: If you specify an incorrect server type, the performance of the migration may be affected. |
--migrate_to_vault |
No parameter required. When enabled, email is migrated to Google Vault. The message is uploaded to the user’s account and is marked as deleted. Google Vault retention rules determine how long the message is retained in Vault. Migrates message without creating any labels in the user’s inbox. Note the following restrictions:
|
--migration_usernames |
Comma-separated list of users for migration (no spaces between items). If you use this argument, don't use --filename. |
--noenable_calendar |
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_error _reports |
No parameter required. Prevents the utility from generating migration reports, which show any message errors that occur during a migration. This can improve the performance of a migration. |
--noenable_id_mapping |
No parameter required. Runs the migration without requiring a mapping file. All mapping data is defined in the list of users by using the command --id_mapping_file="filename". |
--noenable_label_prefix |
No parameter required. Specifies that a prefix won't be added to labels during a migration. This applies when migrating from PST files. By default, the name of the PST file is added as a prefix to the labels and calendars created during the migration. |
--nouse_gui |
No parameter required. Runs the utility via the command line. The regular interactive (GUI) mode is the default if this isn't specified. |
--nowait |
No parameter required. Closes the tool without waiting for the Enter key when the migration is run from the command line. |
--num_threads |
The number users you want to migrate at one time on the client. Example: --num_threads="25" A separate thread is opened for each user. If you don’t specify a value, the default is 25 threads. |
--pst_base_folder |
Directory that contains PST files for migration. Migrates all PST files within the subfolders of the specified folder For detail, see "Prepare folder structure for PST migration" in the GSMME Admin Guide. If you use this argument, don't use: |
--public_folder_mapping _file |
Mapping file name (CSV format). Example: --public_folder_mapping_file="public_folder_mapping.csv" The CSV mapping file specified here maps the Exchange public folder path to the G Suite Group email address. Learn more about Migrating public folders with GSMME. |
--retry_count |
Number of retries to attempt if a temporary failure occurs (such as server busy or a timeout) before giving up. If not specified, the default is 10. |
--run_diagnostics |
No parameter required. Runs the exhaustive pre-migration diagnostics, which validates server connectivity, authentication, access to accounts, and the entire user list. |
--service_account_json _path |
Path to the Service Account credentials file. Example: --service_account_json_path ="C:\Users\admin\privatekey.json" For instructions on obtaining this file, see Authorize GSMME for your domain. |
--source_server |
Exchange/IMAP server IP address or fully qualified domain name. Example: --source_server="mailserver.example.com" In Exchange migrations, use this in conjunction with --exchange_admin_login. If you use this argument, don't use --exchange_profile_name. |
--strip_user_labels |
No parameter required. Specifies that messages are migrated without labels. |
|
No parameter required. Many administrators chose to migrate users first and calendar resources second. If you choose to migrate calendar resources second, configure GSMME to remigrate the users' calendar data. Do this by using --translate_conflicting_events. This instructs GSMME to look at existing events already migrated to Google Calendar. It modifies these events by translating the email address of the Exchange resource to that of the matching G Suite resource. |