Windows 7 / Getting Started

Exchange Management Shell Command Log

When administrators perform tasks in the EMC, the commands are actually carried out using the EMS using PowerShell cmdlets.

By having access to these PowerShell commands, administrators can copy the commands, modify them, and reuse them from the command line or within scripts, without having to manually figure out all the possible parameters.

In Exchange Server 2010, administrators can now capture all the PowerShell commands that are launched during their EMC session in a single location using the new Exchange Management Shell Command Log.

Before the Exchange Management Shell Command Log can be used, it must be enabled. To do so

  1. In the EMC, select View, View Exchange Management Shell Command Log.
  2. In the Exchange Management Shell Command Log, select Action, Start Command Logging.
  3. To modify the number of Windows PowerShell commands to log, select Action, Modify the Maximum Number of Windows PowerShell Commands to Log. Enter a number between 1 and 32767. (The default is 2048.)

When enabled, the Exchange Management Shell command log tracks all PowerShell commands run from the Exchange Management Console.

NOTE: The Exchange Management Shell Command Log is cleared every time the Management Console is closed. If left "enabled," the Exchange Management Shell Command Log begins tracking commands automatically when the EMC is opened.

When viewing the Exchange Management Shell Command Log, detailed information can be viewed about each command by simply selecting the command and reviewing the results in the results pane below. Administrators can also copy a particular command (or multiple commands) to the clipboard by highlighting them and selecting Action, Copy Commands.

Additionally, administrators can clear the command log by selecting Action, Clear Log and can export the contents of the command log by selecting Action, Export List. Exported logs can be saved in any of the following formats:

  • Text (Tab Delimited) (*.txt)
  • Text (Comma Delimited) (*.csv)
  • Unicode Text (Tab Delimited) (*.txt)
  • Unicode Text (Comma Delimited) (*.csv)

To stop recording commands, select Action, Stop Command Logging. Newly issued commands will not be written to the log, but already captured commands will not be cleared until the administrator closes the EMC. You can resume logging commands by following Step 2 of the preceding procedure.

Bulk Recipient Editing

Another welcome addition to the EMC is the ability to edit certain object properties on multiple objects simultaneously, directly from the Management Console. For example, imagine that a request comes down notifying you that your company's East Coast Mergers department, consisting of 150 users, decided to rebrand itself as the East Coast Mergers and Acquisitions department. In Exchange Server 2007, you would have to a) figure out the PowerShell command to change this entry and the script needed to change it for the selected users or b) open each user one at a time and manually make the change.

With Exchange Server 2010, administrators can edit multiple objects at the same time. To perform the same task, simply perform a search for all users where Department = East Coast Mergers, select all users, right-click and select Properties, and enter the new department name. Click on the OK button, and you are presented with a Bulk Edit Summary.

After you review the proposed changes, click Cancel to back out or OK to apply the changes to all selected recipients.

Property Dialog Command Exposure

As mentioned in the section on the Exchange Management Shell Command Log, administrators often want to know what commands the Shell is going to run in the background to accomplish tasks they perform in the Management Console. In Exchange Server 2007, the command was sometimes presented "after the fact"-when an administrator clicked OK, the associated Wizard showed what PowerShell command had been executed. Administrators could then copy the information and paste it elsewhere.

With Property Dialog Command Exposure, administrators can view the Shell commands that will be executed when the command is run. This information can be copied by right clicking and selecting Copy and then pasted elsewhere.

The Shell command to be run can be viewed by clicking the command-line icon that is located in the bottom-left corner of the dialog box. This icon is grayed out until a change is made that requires a shell command to be run.

Using the Exchange Management Console

To use the Exchange Management Console, the administrator selects either the Organization, Server, or Recipient Configuration node, depending on the desired action. The desired server role is then selected, and a list of the servers in the organization that hold that role is shown in the results pane. From there, the administrators can select the specific service they want to administer and view the available options in the action pane.

Items in the results pane can be filtered based on several expressions. This enables an administrator to focus on a subset of items that meet specific criteria. Filters can be made up of one or more expressions and allow minute control over which items are displayed in the results pane.

To create a filter, click Create Filter located in the upper-left corner of the results pane. A filter consists of one or more administrator-defined expressions. Each expression contains three parts: an attribute, an operator, and a value.

The attributes that are available are determined by the object for which you create a filter. For example, when selecting a mailbox server, the available attributes are Database Availability Group, Domain, Edition, Name, Product ID, Role, Site, and Version.

The operators that are available are based on the attribute you select. Some of the possible operators are Equals, Does Not Equal, Contains, Does Not Contain, Is Present, Starts With, Ends With, and others.

Finally, the list of values is also based on the selected attribute. Some values, such as Name or Site, can be typed in to match the name or site of an object in your organization. Others, such as when selecting the attribute of Edition or Role, are selected from a drop-down list.

To add additional expressions (and make the filter more restrictive), click the Add Expression box and input another attribute, operator, and value.

After you have set the expressions that you want, you can click Apply Filter. The expressions you configured are applied to the results pane, effectively filtering the results so that only the objects that match the expression are shown.

Applied expressions can be modified on-the-fly-simply click on the attribute, operator, or value, make the changes you want, and click Apply Filter. This feature can be extremely useful when you make a mistake and find that you have "filtered" yourself into an empty results pane.

To remove any of the created expressions, simply click Remove Expression located to the right of it. This button resembles a red X. However, after you have removed an expression, you must click Apply Filter again to implement the change.

[Previous] [Contents] [Next]