Using the Command-Line Interface
Note
It is highly recommended that you run the Configuration Wizard first against your current server configuration so that you can export a valid configuration file.
This section describes the command-line version of the Configuration Wizard. The command-line interface provides advanced administrators with greater control over the configuration of the Exchange Management Pack. The name of the executable file is ExchangeMPConfig.exe.
The command-line interface supports two major operations: importing a user-created configuration file, or creating a report in the form of a configuration file that shows the current configuration of a server or administrative group.
When importing a configuration file, the command-line interface supports silent operation and interactive operation. For silent operation, you are not required to enter any information beyond command-line parameters. This mode is useful for scripting. To run in silent mode, you must specify, in addition to the configuration file, both the Mailbox Access account user name and password as parameters on the command line. Silent mode can be used only if the Mailbox Access account was previously created.
In interactive mode, you must specify, at minimum, the configuration file that you want to import. Optionally, you can choose to specify a Mailbox Access account on the command line. If it is not provided, the ExchangeMPConfig.exe tool will prompt for it interactively. You will also be prompted for the Mailbox Access account password. If the Mailbox Access account will be created by the tool, you must also specify the location of its Exchange mailbox (Exchange server, storage group, and mailbox store).
The command-line interface, like the wizard, can be run on any workstation or server as long as it meets the prerequisites.
ExchangeMPConfig.exe Syntax
You can import and export configurations using the ExchangeMPConfig.exe tool.
To import and apply a configuration, use the following command-line command:
ExchangeMPConfig.exe /i <filename> [/u <domain\username> [/p <password>]]
/i filename.xml
– Sets configuration on user's servers based on the information in filename.xml.
Optional parameters used with /i are as follows:
/u username
– the user can use the /u parameter to specify the Mailbox Access account. The user name will be in the DOMAIN\username format. The tool will validate this.
/p password
– the user can use the /p parameter to specify the password for the Mailbox Access account. /u is required.
To export a configuration, use the following command-line command:
ExchangeMPConfig.exe /e <filename> [/s <serverFilter>] [/a <administrativeGroupFilter>]
/e filename.xml
– Creates a report named filename.xml that contains the configuration information of the selected servers. Filename.xml is the configuration file (configuration.xml) that is used with the /i parameter.
Optional parameters used with /e are as follows:
/s servername
– specifies the server from which to obtain the configuration file, instead of the default local computer. It can be used in combination with wildcard characters such as * and ?. Examine the usage output of the tool for more information.
/a admin group
– specifies the common name of an administrative group from which to obtain the configuration. If this parameter is set, the tool discovers all Exchange servers in the specified domain, obtains the configuration information from each server, and saves it to the configuration file. It can be used in combination with wildcard characters such as * and ?.
/?
– Displays the valid command switches for the command and gives a summary of what each does.
Each parameter must be separated by a space from the value associated with the parameter. For example, /e configuration.xml is valid, but /e:configuration.xml, /e=configuration.xml, and /econfiguration.xml are not valid parameters.
The following table lists typical command lines that you can use to run ExchangeMPConfig.exe.
Command Line | Description |
---|---|
ExchangeMPConfig.exe |
This command runs the wizard in the user interface mode. |
ExchangeMPConfig.exe /i configuration.xml |
This command imports the configuration specified in configuration.xml. An error is presented if the local computer does not have the Exchange System Manager tools installed, or the current user does not have permissions to do the required configuration. Because no Mailbox Access account is specified on the command line, when the command executes, you are prompted for the Mailbox Access account user name and password only if required by the configuration. Note The password field is not shown. As you type characters in the password, the command prompt pointer remains at the same location. Output:
Output (failure, permissions):
Output (failure, management tools not installed):
Output (failure, other):
Output (failure, command line parameters invalid):
|
ExchangeMPConfig.exe /i configuration.xml /u ExDom\MailAcct |
This command functions the same as ExchangeMPConfig.exe /i configuration.xml, but because the username is provided, you are not prompted to enter a Mailbox Access account interactively. However, you are still prompted for a Mailbox Access account password only if necessary in the configuration. Output:
|
ExchangeMPConfig.exe /i configuration.xml /u ExDom\MailAcct /p pass |
This command does the same action as the previous command, but the Mailbox Access account password is provided on the command line. You are not prompted to interactively enter any information when using these parameters. |
ExchangeMPConfig.exe /e report.xml |
This command generates a configuration file that contains the current configuration information for all Exchange servers. The file format is compliant with the format required for the /i parameter. Output:
Output (failure, permissions):
Output (failure, monitoring pack not installed):
Output (failure, other):
Output (failure, command line parameters invalid):
|
ExchangeMPConfig.exe /e report.xml /s exch1 |
This command generates a configuration file. The system is specified with the /s parameter and the configuration of that system is retrieved instead of the local system. The listed server name can be the NetBIOS or FQDN name for the Exchange computer. Besides the errors listed in the previous command, the Exchange System Management Tools must be installed on the system where the configuration tool runs. If the tools are not on the local system, you will receive an error. Also, if the specified server cannot be contacted, you will receive an error. Only errors that are different from the above are listed here. Output:
Output (failure, management tools not installed):
Output (failure, server unreachable):
|
ExchangeMPConfig.exe /e report.xml /a ExAG1 |
This command works similarly to the previous two commands. It generates a configuration file for the domain specified with the /a parameter. All servers running Exchange and the Exchange Management Pack are queried for their current configuration. The administrative group name must be the common name of the administrative group. Output:
Output (failure, server unreachable):
Output (failure, Exchange 5.5 Admin Group):
Output (failure, other):
|
ExchangeMPConfig.exe /? |
This command displays the usage information for the executable. Usage information is also displayed if the user does not enter valid command line parameters. |