Using the Exchange Management Shell
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.
Are you just trying to run the script or have you followed the directions below?
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.
Opening the Exchange Management Shell
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
1. Click Start, click Programs, and then click Microsoft Exchange Server 2007.
2. Click Exchange Management Shell.
To add the Exchange Management Shell snap-in from Windows PowerShell
1. Click Start, click Programs, and then click Windows PowerShell 1.0.
2. Click Windows PowerShell.
3. Type the following command: