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.
Beside the client-side commands, the Management Shell also offers access to server-side commands of the MailStore Server Administration API. Output of server-side commands is in JSON format.
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 > Management API > Command Prompt.
The font size can be adjusted by holding the Ctrl key and using the mouse wheel or pressing + and -. Holding down the Ctrl key and pressing 0 resets the font size.
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. MailStoreCmd.exe can be found in the installation directory of MailStore Server. MailStoreCmdSilent.exe does the same, but does not open a console window.
Login credentials for your installation can be found in the scheduled task of an archiving profile of the type E-Mail Programs or E-Mail Files.
There are multiple ways to pass credentials to MailStoreCmd.exe.
To read credentials from the Windows Credentials Manager, they have to be stored there first. The MailStore Client does this automatically when creating a scheduled task in the Windows Task Planer. This methods prevents reading passwords easily by unauthorized persons.
MailStoreCmd.exe --h=<server> --cred=<user>@<server/ip address> --pkv3=<thumbprint> -c <command> [--param1=<value> --param2=<value> ...]
The credentials can also be passed as plain text.
MailStoreCmd.exe --h=<server> --u=<user> --p=<password> --pkv3=<thumbprint> -c <command> [--param1=<value> --param2=<value> ...]
The below command line parameters are required followed by additional API command parameters if necessary.
||The machine name of the MailStore server to which code>MailStoreCmd.exe is to connect.|
||The (optional) Public Key Fingerprint, which guarantees the identity of MailStore Server.|
||Alternative to |
||Optional. Prevents the logo from being displayed.|
||Optional. Redirects the output to a given file. When this parameter is given, no output is sent to the console.|
||The actual command follows (non-interactive mode).|
Find a list of all client side commands below. An overview of all available server side commands can be found under Function Reference.
Clears the texts currently displayed improving visibility.
Activates debug protocol for IMAP and HTTP connections during archiving for the running MailStore Client process.
Opens the file explorer and shows MailStore's Debug Log directory.
Activates or deactivates the global debug protocol (within computer scope).
Enables envelope journaling on Exchange 2003 servers. When the parameter --d is given, envelope journaling will be disabled. This command must be executed from a domain joined computer.
export-execute [--name=<profilename>] [--id=<profileid>] [--verbose] [--[property]="value"]
Executes an export profile. Following parameters are supported:
||name or ID of the export profile to execute|
||activates a detailed status display on the console|
||Overwrites the given property of a profile. The internal properties can be displayed, by selecting an export profile and press |
Displays a list of all existing export profiles (ID and profile name).
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 or ID of the import profile to execute|
||activates a detailed status display on the console|
||user archive to store archived emails|
||Overwrites the given property of a profile. The internal properties can be displayed, by selecting an archiving profile and press |
Displays a list of all existing archiving profiles (ID and profile name).
livelog-client-disable, livelog-client-enable, livelog-server-disable, livelog-server-enable
Activates or deactivates the live debug protocol of MailStore Server or MailStore Client. The live protocol can be viewed with Sysinternal's DebugView. DebugView must be started with elevated privileges and it must be configured to capture Global Win 32 events.
store-setprop --name=<name> [--value=<value>]
Changes the value of a global property
||Name of the global property|
||Value of the global property|
Following global properties are supported:
|public.arcclient.skipMimeContentConversionFailed||8||true = Exchange MimeContentConversionFailed errors are ignored and not handled as an archiving error.
false = Exchange MimeContentConversionFailed errors are handled as archiving errors.
|public.arcclient.skipVirusDetected||8.1||true = Exchange ErrorVirusDetected errors are ignored and not handled as an archiving error.
false = Exchange ErrorVirusDetected errors are handled as archiving errors.
|public.arcclient.skipEwsErrorItemNotFound||10||true = Exchange ErrorItemNotFound errors are ignored and not handled as an archiving error.
false = Exchange ErrorItemNotFound errors are handled as archiving errors.
|public.backup.hideNotDetectedWarningMessage||10.3||true = Backup warning messages are not shown on dashboard.
false = Backup warning messages are shown on dashboard.
Display list of users.