Microsoft Outlook
ReliefJet ESSENTIALS™
for Microsoft Outlook
ReliefJet Essentials for Outlook is a comprehensive set of more than 170 tools for performing a wide range of tasks in processing email messages, contacts, appointments, meetings, tasks and other Outlook items as well as Office 365 or Exchange Server folders and mailboxes.
ReliefJet Essentials™
for Microsoft Outlook
Download  Purchase

Command line

The command line interface (CLI) of ReliefJet Essentials for Outlook allows you to run the utilities without having to run Outlook or the launcher application. Command line support is especially useful when integrating with existing email processing systems and batch scripts and when performing mass processing of mailboxes and storages. Furthermore, it allows the use of Windows Scheduler along with ReliefJet Essentials for Outlook. Please note that command line is available in the professional edition of the product only.

Basics

The command line application is located in the folder where ReliefJet Essentials for Outlook is installed; the name of the executable file is ExecutorCli.exe. Running this application is very similar to running other Windows commands: just insert the ExecutorCli call into your scripts or simply run it from Windows command line. You can show the ready to run command in the launcher application by configuring the utility and clicking the Show command line button.

Here is ExecutorCli general syntax:
> ExecutorCli.exe OPTIONS

Supported options:

-Help (-?, -h)

get help on using the command line

-Utility (-u) CODE [PARAMETERS]

specify the utility to be run (can be specified multiple times)

-Parameter (-p) NAME=VALUE

set the parameter named NAME to VALUE

-QuietMode (-q)

display minimum information when running

-Verbose (-v)

display maximum information when running

-Logging (-l)

enable diagnostic logging

You can specify the utility to be run by entering its code. The utility codes can also be listed in a regular plain-text list file, which is one code per line. After that, pass the path to the file to ExecutorCli with the "at" sign (@) as a prefix. Placing the same code multiple times is allowed in both the command line and the list file. This will run the utility as many times as its code is listed. Moreover, you can specify any number of list files and even make series of utility codes and list files.

Tip: To get the required utility codes, run ExecutorCli with no options specified. This will enable utility code search mode. In this mode you can type the part of the utility’s name to search for its code.

Example: -u OutlookReportDuplicates -u @Utils.txt -u OutlookReportDuplicates

This series of -u options generates a report on duplicates, runs the utilities listed in Utils.txt file and then generates another report on duplicates. Here is a content sample for the Utils.txt file:

OutlookContactsRemoveDuplicates
OutlookAppointmentsRemoveDuplicates
;OutlookNotesRemoveDuplicates
OutlookTasksRemoveDuplicates
;OutlookJournalRemoveDuplicates

Note: The lines beginning with a semicolon will not be processed. This could be useful when you need to temporarily disable certain utilities that are listed in the file.

Console output redirection is supported through standard Windows channels: STDOUT (1) for messages and STDERR (2) for errors. Thus, you can extract all errors to a separate file if it is required.

Example:

> ExecutorCli -q -u OutlookReportStorages For=\\* >Report.txt 2>Errors.txt

This command creates a report on Outlook storages from default profile in Report.txt file. While all errors are being saved to Errors.txt file. You can always merge all output using a standard 2>&1 notation.

The utilities running in the command line can be terminated at any time by pressing the Ctrl+C or Ctrl+Break shortcut on the keyboard. Upon exiting, ERRORLEVEL environment variable is set to one of the following values:

0 execution succeeded,
1 execution cancelled by a user,
2 execution terminated because of an error.

Utility start-up parameters

In order to run the utilities, you may need to specify certain parameters. For example, that could be an Outlook profile, a folder with messages to be processed, a mailbox on Exchange Server, etc. The parameter values are passed with the -p option. In this case, parameter names and values that contain the space character are encased in quotes. To specify parameters with multiple-line values, you can use text files, just the way you do with the –u option.

Example: -pProfile="My profile" –pMailbox=@Mailboxes.txt

This series of –p options uses the Outlook profile named My profile and a list of mailboxes from the Mailboxes.txt file.

Note: All the parameter names are case-sensitive, so using profile instead of Profile will result in an error.

You can specify parameters without using the -p option. These parameters only apply to the utility specified before them. Otherwise, the parameters are considered common to all utilities and are processed in the first place.

Example:

> ExecutorCli -pFor=\* -u OutlookReportFolders -u OutlookReportFolders TreeView=True

This command builds two reports on all folders from the default account, because the For parameter is set using the -p option, but the second report will be in the form of a tree, since the TreeView parameter applies only to the second utility.

Frequently used options:

Profile

Outlook profile name (MAPI)
Example:
-pProfile="My profile"
The default profile will be used when no profile is specified.

For

Path to storages or folders to be processed (for utilities working with storages and/or folders)
This option is mandatory in many utilities. Here is the general path syntax:
\\Storage\Folder\Subfolder\...
A double backslash (\\) is followed by the name of the storage in the specified (or default) profile. A storage name can be replaced with an asterisk (*) character to specify all the storages in a profile or with {DEFAULT} to specify the default storage. On the first folder level (immediately following the storage name), you can specify a macro that sets a special folder in curly brackets: {INBOX}, {OUTBOX}, {SENT}, {DRAFTS}, {DELETED}, {JUNK}, {CONTACTS}, {CALENDAR}, {TASKS}, {NOTES}, {JOURNAL} or {RSS}. The {SEARCH} macro specifies the path to Outlook Search Folders and the {SHARED} macro points to other user’s folders connected to your Outlook mailbox. It is also possible to specify a {PUBLIC} macro that represents the root of the public folders tree from the default Exchange Server account.
Example:
-pFor=\\*\{INBOX}
This path tells the program to process all the Inbox folders in all the storages of the selected profile. Please note that the path specifies only the Inbox folders, not including the subfolders. To specify a folder with all its subfolders, terminate the path with the asterisk (*) character:
-pFor=\\{DEFAULT}\{CONTACTS}*
This path points to the Contacts folder in the default storage with all its subfolders. To specify subfolders only, use the following syntax:
-pFor=\\*\{JUNK}\*
This path points to all subfolders of the Junk E-Mail folders in all storages. Please note the backslash (\) character at the end of the path. Without that backslash in place, the path would point to the Junk E-Mail folder too.
You may omit storage name. In that case, the program reads the path as relative to current storage. Current storage is the default Outlook storage unless the Mailbox or File parameter is set. If one of those parameters is set, current folder is the mailbox or file to be processed.
Example:
-pFor="{INBOX}\My Customers\*"
This path includes all subfolders in the My Customers folder, which is a subfolder of the Inbox folder in the current storage.

Note: Quotes are used because the name of My Customers folder contains a space character.

To refer to current storage only, use backslash: -pFor=\
To specify all folders of current storage only, use asterisk: -pFor=*

For

Path to addresses or address books to be processed (for utilities working with address books and/or addresses)
General rules to specify this For variant are the same with storages and folders. However, special folder macros are not applicable here and account names are used instead of storage names (often these names are the same).

To specify the address book, you can use {DEFAULT} (default address book), {GAL} (Exchange Server Global Address List) and {PAB} (Outlook Personal Address Book) macros.

For example:

-pFor=\\user@domain.com\{GAL}\
specifies all addresses from Global Address List of the user@domain.com account.

The same rules apply to nested address books as apply to subfolders:

-pFor="\All Address Lists\*"

the path above tells the program to capture all address books that are nested of All Address Lists in the default account.

Moreover, you can directly specify emails for the utilities that operate with addresses such as:

-pFor="Any Recipient Name [user@domain.com]"

The recipient name is optional. Square brackets are mandatory to specify the email addresses; otherwise, the address will be interpreted as a part of the recipient’s name.

Mailbox

Mailbox on Microsoft Exchange Server
Exchange mailboxes can be specified with user aliases, their primary email addresses or unique Exchange names (ExchangeLegacyDN).
Examples:
-pMailbox=test
-pMailbox=test@domain.com
-pMailbox="/o=Org/ou=Admin Group/cn=Recipients/cn=Test User"

File

Path to Outlook storage file (.PST)
Examples:
-pFile="C:\My data files\Archive.pst"
-pFile=\\server\d$\archive.pst

IgnoreErrors

Ignore runtime errors
Can take the values of 1 (True) or (default) 0 (False).
Example:
-pIgnoreErrors=1 or -pIgnoreErrors=True
When the parameter is set to 1, the command is running several utilities, and some utility halts with an error, the command will continue with the remaining utilities. If the parameter is not set, the program automatically will take it as 0, i.e. the command will terminate should any error occur.

OnlineMode

Use online mode to connect to Exchange Server
Can take the values of 1 (True) or (default) 0 (False).
Example:
-pOnlineMode=1 or -pOnlineMode=True
When the parameter is set to 1, the connection to Exchange Server mailboxes will be established without using the cached mode. It becomes possible to obtain data that is stored only on the server and are not available in the local .OST store. Please note that in this case, the processing performance can be seriously degraded.

StartDate, EndDate, Date

Dates and date range
The general format is as follows: "Date Time Offset". All components are optional. Date can be specified in a free form. The time is in 24-hour format. It is also possible to specify relative offsets of the dates and times.
Example:
Date="1.1.15 23:00"
specifies January, 1 2015 11:00 PM. If the date or time is not specified, the current value will be used. In addition, by specifying the date, you can omit the year and month to use the current values. ​​

Sometimes you do not want to specify an exact date, but offset from it for a few hours/days/weeks etc. For instance, it is often required to get the results in the range of "last week", "this month, "last year", etc. In this case, it is possible to set the relative offset by a using + sign (in the future) or - sign (in the past), followed by an offset unit specifier: H – hours, D – days, W – weeks, M – months or Y – years.

Example:

StartDate=-1D

sets the value of the parameter to the yesterday’s date.

Special offset values of -0 and +0 specify the beginning and the end of the specified period, respectively:

StartDate=-0W EndDate=+0W

sets a date range from the beginning to the end of the last week, and

StartDate="-0M -1M" EndDate="+0M -1M"

sets dates from the first to the last day of the previous month.

The date, time and relative offsets can be combined.

Example:

StartDate="1 00:00 -1M" EndDate="1 23:59:59 -1D"

Such a record will also set a range of dates from the first to the last day of the previous month. Please note that the first "1" indicates the first day of the current month of the current year because the month and the year are not provided.

Besides these, any utility may have additional parameters, which you can get by running the ExecutorCli command with the -? option followed by the list of the desired utilities. For example, to get the parameters supported by the "Folder Report" utility, run the command:

> ExecutorCli -? -u OutlookReportFolders

While the -p option sets parameters for all of the listed utilities, utility-specific parameters are set immediately after their codes, without specifying the -p option:

> ExecutorCli -u OutlookReportFolders For=\\{DEFAULT}* TreeView=1

This command builds a tree-view report on all Outlook folders in the default storage. Please note that the parameter specified after the utility code has a higher priority than the parameter specified with the -p option. Utility parameters may also be specified in a list file.

In some cases, it may be necessary to specify an Outlook folder, which is to be created by the utility to be run. In this case, it may be necessary to specify the type of items for that folder. For example, while running the "Import Items from MSG Format" utility:

> ExecutorCli -u OutlookItemsImportMSG Contacts=1 SourceDir="C:\MSG" Target={CONTACTS}\Imported{CONTACTS}

Please note the {CONTACTS} macro at the end of the Imported folder name; it specifies the type of items for that folder. It will be used when creating the folder if it does not exist. Here is the list of possible values: {MESSAGES}, {CALENDAR}, {CONTACTS}, {TASKS}, {JOURNAL}, {NOTES}. If no folder type is specified, the program will automatically use parent folder’s type or {MESSAGES} for storage root folders.

Running utilities by schedule

Command line application can be useful to run various utilities included in the product, according to a schedule. To do this, you need to create a task in Windows Task Scheduler.

To schedule any utility, follow these steps:

1. Make sure the computer or server has a user who installed and configured Microsoft Outlook. If this user does not exist, create it and configure Outlook for this user.

2. Log in as a specified user and verify the required ReliefJet Essentials command line works correctly. You can then switch user.

3. Open Task Scheduler by using the Windows Start Menu or start the Taskschd.msc MMC snap-in.

4. Create a new task in the desired Task Scheduler Library folder.

5. Specify the task name and the user account you chose in step 1. Task Scheduler allows you to run a task, even when the user is not logged in; that may be necessary on servers and workstations. In this case, you have to save the password for the selected user; otherwise, the utility will not run.

6. Adjust the desired time and the period of the task.

7. Specify the Start the program action, select the ExecutorCli.exe program from ReliefJet Essentials installation, and add the arguments to launch the utility. To execute a more complex scenario, you can create a batch file and specify it as the program to run.

8. Save the task and specify the password of the selected user to run a task.

9. Check that the task is correctly configured by running it manually.

Experienced administrators can also use the Schtasks.exe command line tool shipped with Windows to create the desired task.

Usage samples

Below are a several examples of using the command line of ReliefJet Essentials for Outlook. Take your time to look through these examples to better understand how you can benefit from using the command line.

Example 1:

> ExecutorCli -pIgnoreErrors=1 -pFor=\\* -pMoveTo={DELETED} -u OutlookMessagesRemoveDuplicates -u OutlookContactsRemoveDuplicates

This command runs a series of the "Remove Duplicate Messages" and "Remove Duplicate Contacts" utilities for all the folders in all the storages of the default profile. The duplicates will be moved to the Deleted Items folder of the default profile. Now, if an error occurs while the first utility is running (for example, it fails to access the folder where the duplicates are to be moved), the second utility will run anyway. When the IgnoreErrors parameter is absent or set to 0, in case of an error with the first utility, the second utility wouldn't be run.

Example 2:

> ExecutorCli -q -u@Utils1.txt -u@Utils2.txt

The command sets the quiet mode of running the utilities, the parameters of which are listed in the files Utils1.txt and Utils2.txt. No verbose information will be displayed on the screen. If any error occurs while running any of the utilities, the command will be immediately halted.

Example 3:

> ExecutorCli -pMailbox=@Mailboxes.txt -u OutlookReportAttachments Mask=*.mp*;*.avi

Gets a report on audio and video files of certain types contained in users' mailboxes, which are listed in Mailboxes.txt.

Example 4:

> ExecutorCli -pProfile="My Archives" -pFor="\\Archive 1\*" -u@Utils.txt

Contents of the Utils.txt file:

OutlookMessagesRemoveDuplicates AcrossFolders=1 Permanent=1
OutlookAttachmentsPack Mask=*
OutlookItemsFieldsDelete Fields=TransportMessageHeaders

Optimizes the size of storage Archive 1 in profile My Archives by removing all duplicates, compressing attachments and removing unnecessary message headers.

Example 5:

> ExecutorCli -pFile=@Files.txt -pFor={INBOX}* -pTargetFile=C:\Data.txt -u@Utils.txt

Contents of the Utils.txt file:

OutlookMessagesEmailSave
OutlookMessagesURLSave
OutlookItemsFieldsSave Names=True TargetFile=C:\Headers.txt

Files.txt file sample:

\\comp1\c$\Users\user 1\AppData\Local\Microsoft\Outlook\Outlook.pst
\\comp2\c$\Users\user 2\AppData\Local\Microsoft\Outlook\Archives.pst
C:\Documents and Settings\user3\Local Settings\Application Data\Microsoft\Outlook\Outlook.pst

This command extracts email addresses and internet hyperlinks from all files listed in Files.txt to the file C:\Data.txt; the command extracts from the messages located in the Inbox folder and all of its subfolders. Furthermore, the command saves all the message headers (fields) to the file C:\Headers.txt. Please note how the latter utility redefines the target file names.



Latest News
  • ReliefJet Essentials for Outlook 5.0 is available for free download right now!

More... RSSRSS
30 Days Moneyback Guarantee
Compatible with Windows 10