Olvasás angol nyelven

Megosztás a következőn keresztül:


Using the Exchange Management Shell

Microsoft Exchange Server 2007 will reach end of support on April 11, 2017. To stay supported, you will need to upgrade. For more information, see Resources to help you upgrade your Office 2007 servers and clients.

 

Applies to: Exchange Server 2007, Exchange Server 2007 SP1, Exchange Server 2007 SP2, Exchange Server 2007 SP3

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.

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:

    Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin
    
  4. Use the chdir command to change to the Exchange Server\Bin directory. For example, type:

    chdir "c:\program files\microsoft\exchange server\bin"
    
  5. Type the following command:

    .\Exchange.ps1
    

Finding More Detailed Information About the Exchange Management Shell

The following topics provide specific details about the Exchange Management Shell:

For More Information

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.