View PowerShell commands ran by Exchange Management Console

Here is a quick tip on how you can do to view the commands that Exchange Management Console runs in the background when you do changes using EMC. EMC is basically just a GUI that runs PowerShell commands in the background to execute the changes we make in the GUI.

There are two ways of displaying these PowerShell commands.

The Show Exchange Management Shell Command button

This button is very useful and easy to find. It is located in the bottom-left corner of the dialog boxes used to reveal and set properties on Exchange objects.


When you click this button a window opens, showing the Windows PowerShell command that Exchange will execute when you click OK or Apply. Again, you can use this button to view the commands BEFORE you actually apply the changes.


Exchange Management Shell Command Log

Another tool new to the EMC in Exchange 2010 is the Exchange Management Shell Command  Log. It records all shell commands that you run in EMC. You can use this tool to log commands, view then and also export them to a CSV file.

To view the Exchange Management Command Log by right-clicking an object
such as Mailbox in the left pane of EMC and then clicking View and selecting View Exchange
Management Log.


I the lower pane you can see and copy the commands, this is an excellent way of getting help and tips when creating PowerShell commands and scripts.


Thanks for reading!

3 Responses to View PowerShell commands ran by Exchange Management Console

  1. Mary says:


    Nice article
    However, the command shell button is not activated for me !
    Is there a way to make it enabled?


    • Martin Sundström says:

      Hi Mary,

      Thanks for the feedback and thanks for reading!

      Could it be that you have applied the changes before viewing the command? You must click to view the command before you click apply or the command will not be viewable.


  2. Ry says:

    Absolutely Brilliant!!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: