Using the Exchange Management Shell
Applies to: Exchange Server 2007, Exchange Server 2007 SP1, Exchange Server 2007 SP2, Exchange Server 2007 SP3
Topic Last Modified: 2009-05-26
The Exchange Management Shell, built on Microsoft Windows PowerShell technology formerly codenamed "Monad", provides a powerful command-line interface and associated command-line plug-ins for Exchange Server that enable automation of administrative tasks. With the Exchange Management Shell, administrators can manage every aspect of Microsoft Exchange 2007. They can enable new e-mail accounts and configure SMTP connectors, store database properties, transport agents, and more. The Exchange Management Shell can perform every task that can be performed by Exchange Management Console in addition to tasks that cannot be performed in Exchange Management Console. In fact, when a task is performed in the Exchange Management Console, the same command is made available to the Exchange Management Shell and called to process the request.
The Exchange Management Shell also provides a robust and flexible scripting platform that can reduce the complexity of current Microsoft Visual Basic scripts. Tasks that previously required many lines in Visual Basic scripts can now be done by using as little as one line of code in the Exchange Management Shell.
The Exchange Management Shell provides this flexibility because it does not use text as the basis for interaction with the system, but uses an object model that is based on the Microsoft .NET platform. This object model enables the Exchange Management Shell cmdlets to apply the output from one command to subsequent commands when they are run.
You can open the Exchange Management Shell by using either of the following procedures. Each procedure loads the Exchange Management Shell snap-in into the Windows PowerShell. If you don't load the Exchange Management Shell snap-in before you run an Exchange Management Shell cmdlet, you will receive an error.To open the Exchange Management Shell from the Programs menu
Click Start, click Programs, and then click Microsoft Exchange Server 2007.
Click Exchange Management Shell.
Click Start, click Programs, and then click Windows PowerShell 1.0.
Click Windows PowerShell.
Type the following command:
Use the chdir command to change to the Exchange Server\Bin directory. For example, type:
chdir "c:\program files\microsoft\exchange server\bin"
Type the following command:
The following topics provide specific details about the Exchange Management Shell:
This topic, and all the topics in this section of the Exchange Server Library, are available as a downloadable white paper. To download this collection of topics as a white paper, see White Paper: Exchange Management Shell.
For information about individual Exchange Management Shell cmdlets, see Exchange 2007 Cmdlets.
For more information about how to use the Exchange Management Shell cmdlets to manage your Exchange Server 2007 organization, see Operations.
For a list of frequently used Exchange Management Shell command examples that are organized by administrative functions, such as recipient management and transport configuration, see Exchange Management Shell Quick Reference.