Friday, 25 June 2010 09:46

How Command Logging works in Exchange 2010…

Written by

Microsoft has now introduced a new tracking method for the Shell commands that you run in the EMC called Command Logging . This new feature can be used to track down all the cmdlets that are used against the exchange server through EMC.  In this post, I have explained how to enable, disable the command logging, also will cover the part of exporting the log to files.

How to Enable and Disable Command Log: 

Open the Exchange Management Console (EMC) and navigate to Toolbox. Click on View and select “View Exchange Management Shell Command Log…

Open-Cmd_Log

Now you will be able to see the Command Log window, click on Action\Start Command Logging. You can see the current settings of Command logging at the bottom of View Exchange Management Shell Command Log window and shown below.

start-CmdLog 

The Command Log window will show you the list of commands that are executed from now, you can also specify the number of PowerShell commands to be logged by modifying the “Modify the Maximum Number of Windows PowerShell Commands to Log” setting. Once you have done the setting as per your requirement, go and the desired actions in EMC and see the results in View Exchange Management Shell Command Log window

Logs-NewMailbox

If you have done with your execution, you can stop the Command Logging by clicking on Action\Stop Command Logging as shown below.

stop-CmdLog 

The shell cmdlets will not be logged post the 'Stop Command Logging', however you will be able to export and view the logs till you close the EMC console.

How to Export the Command Log:

There are some cases where you would like to sent the Command Log as a proof followed by a change or any actions, you can now use the feature of exporting the Command Log as shown below.

Export-CommandLog

The files can be saved as txt or csv formats. The command log can be a great help when you need to send a proof report about any changes on your exchange 2010 environment.

Reference: Exchange Management Shell Command Log to Track Tasks Performed in the EMC

-Praveen

theme by reviewshub