The Exchange Management Shell is the best tool overall for controlling your Exchange Server 2007
organization. This chapter provides an overview of the management functionality it provides.
This chapter also explains why you should consider learning Exchange Management Shell an
essential part of building your Exchange Server 2007 management skills.
The section “ Shell versus Console ” provides a comparison between the two interfaces in the
context of the Exchange management functions they provide and when to choose the Exchange
The section “ Working from the Command Line ” provides some basic information for getting
started using Exchange Management Shell. It covers navigation, using aliases and variables with
Exchange cmdlets, and some general tips you ’ ll find useful.
The final section, “ Working with Windows, ” tells how to control services and processes, access the
Windows Registry as a drive, and view Windows event logs.
In this chapter you learn:
Exchange cmdlet sets
Variables, aliases, and functions
Process and service control
Event log control
c02.indd 33c02.indd 33 12/17/07 3:20:06 PM12/17/07 3:20:06 PM
Part I: PowerShell for Exchange Fundamentals
Why Learn Exchange Management Shell?
Because you are reading this book you have already taken steps to advance your knowledge of the
Exchange Management Shell. Maybe you already realize that Exchange Management Shell is a vital part
of Exchange Server 2007 management. Or maybe you are curious to find out just what this “ shell thing ”
does. Either way, learning how to use Exchange Management Shell is essential for any Exchange
administrator. For those of you that still may need some convincing, here are some points to consider:
Exclusive Operations: Many operations available in Exchange Management Shell are not
included in Exchange Management Console; therefore you are forced to use the shell. In these
situations you have no other choice.
Bulk Operations: Many of the operations available in the Exchange Management Console are
singular, in other words you can take action on only one object at a time. Large organizations
needing to perform changes to thousands of objects on a regular basis know that bulk
operations save time and lessen the chance of operator error. Using the pipeline to pass objects
from one cmdlet to another in Exchange Management Shell provides a quick and easy method
for taking action on any number of objects from the command line.
Automation: Exchange Management Console provides no way for automating even simple
operations. Scripts run from the Exchange Management Shell ensure consistent results and can
be used to work out complex administrative tasks.
Just how deeply you need to learn Exchange Management Shell depends a lot on your responsibilities. If
you administrate a large organization with multiple server roles, it is likely Exchange Management Shell
is used on a daily basis. Smaller organizations may not require as much use, but rest assured the shell is
used from time to time.
Shell versus Console
When first learning Exchange Server 2007 administration, there may be times when you ’ ll wonder which
options are available to you when choosing between the console and the shell interfaces. Without
knowledge of what you can accomplish from either interface, you may struggle to find the right path.
This section gives a comparison of operations available in the Exchange Management Console and in the
Exchange Management Shell. It also describes the layout of the console and how this information can be
used to understand the structure of cmdlets in the shell. Included is a summary of Exchange cmdlets and
methods for categorizing these cmdlets based on administrative scope.
Each Exchange component has administrative functionality made available via cmdlets. That
functionality is always available in the Exchange Management Shell and may be available in the
Exchange Management Console. The availability of administrative functionality for a given Exchange
component falls into one of three categories:
Parity: There is complete parity between the functionality available from the shell and the
console. Bulk operations and filtering are possible using shell commands but the console makes
it possible to accomplish the same operations to at least one object at a time.
c02.indd 34c02.indd 34 12/17/07 3:20:07 PM12/17/07 3:20:07 PM