MailStore Server Management Shell

Many instructions available in the graphical user interface of MailStore Client can also be executed using MailStore's management shell, a command line client which is automatically included when installing MailStore Server and MailStore Client.

The management shell is useful when no graphical user interface is available (e.g. if using telnet or ssh) or for the integration of scripts (e.g. batch files) that are executed either manually or automatically.

Option 1: Starting the Management Shell in MailStore Client

The management shell can be started directly from MailStore: Log on to MailStore Client as administrator and click on Administrative Tools > Miscellaneous and then on Management Shell.

Tech mscmd 01.png

Option 2: Starting the Management Shell with MailStoreCmd.exe

The command line client can be started in interactive mode by executing MailStoreCmd.exe without any parameters. After successful login, MailStore is ready to receive commands. Enter exit to log off and close the management shell.

Tech mscmd 02.png

Using MailStoreCmd.exe in Non-Interactive Mode

In non-interactive mode, the management shell logs on with the access data passed, executes the command passed, and automatically terminates upon execution. If the login and the execution of the command were successful, the exit code (ERRORLEVEL) of the process is set to 0 (zero), otherwise it is set to any value other than 0.

To use the non-interactive mode, pass the parameters as follows:

 MailStoreCmd.exe --h="localhost" --pkv3="23:18:06:3f:24:7d:f3:83" --u="admin" --p="admin" 
 -c <Actual Command and Parameter>

The following is a description of the parameters:

 --h="localhost"

The machine name of the MailStore server to which MailStoreCmd.exe is to connect.

 --pkv3="..."

The (optional) Public Key Fingerprint, which guarantees the identity of MailStore Server.

 --u="admin"

User name.

 --p="admin"

Password.

 -c

The actual command follows (non-interactive mode).

Command Overview

Find a list of all client side commands below. An overview of all available server side commands can be found under MailStore Server Administration API Commands.

Hint: Enter schedule in front of a management shell command, client and server side, allows you to define a schedule for executing the given management shell command regularly.

 backup --target=<targetdirectory> [--nosync] [--skipreadonly] [--filegroups=1,2,...,4]

Create a backup of the archive. Following parameters are supported:

--target directory where to create the backup
--nosync copy all files; not only new or modified ones
--skipreadonly skip file groups marked as read only
--filegroups=1,2,...,4 make backup of given file groups only
 clear

Clears the texts currently displayed improving visibility.

 debug-conn

Activates debug protocol for IMAP and HTTP connections during archiving for the running MailStore Client process.

 debug-console,  debuglog-browse,  debuglog-disable,  debuglog-enable

Activates, displays or deactivates the global debug protocol (within computer scope).

 export-execute [--name=<profilename>] [--id=<profileid>] [--verbose] [--[property]="value"]

Executes an export profile. Following parameters are supported:

--name | --id name or ID of the export profile to execute
--verbose activates a detailed status display on the console
--[property] Overwrites the given property of a profile. The internal properties can be displayed, by selecting an export profile and press CTRL + SHIFT + P. The name of the property has to be in brackets. Multiple properties can be modified by repeating the parameter.
 export-list

Displays a list of all existing export profiles (ID and profile name).

 help

Displays a list of all available commands and their parameters.

 import-execute [--name=<profilename>] [--id=<profileid>] [--verbose] [--user=<username>] [--[property]="value"]

Executes the archiving profile. Following parameters are supported:

--name | --id name or ID of the import profile to execute
--verbose activates a detailed status display on the console
--user user archive to store archived emails
--[property] Overwrites the given property of a profile. The internal properties can be displayed, by selecting an archiving profile and press CTRL + SHIFT + P. The name of the property has to be in brackets. Multiple properties can be modified by repeating the parameter.
 import-list [--user=<username>]

Displays a list of all existing archiving profiles (ID and profile name).

 store-setprop --name=<name> [--value=<value>]

Changes the value of a global property

--name Name of the global property
--value Value of the global property

Following global properties are supported:

Name Version Values Default
public.arcclient.skipMimeContentConversionFailed 8 true = Exchange MimeContentConversionFailed errors are ignored and not handled as an archiving error.

false = Exchange MimeContentConversionFailed error are handled as archiving errors.

false
 user-list

Display list of users.