Datasheet

Part I: PowerShell for Exchange Fundamentals
6
Because Windows PowerShell is fully extensible, software developers can create their own custom
built - in commands to handle those administrative tasks not already addressed in the default built - in
command set. Exchange Management Shell is an example of Windows PowerShell extended to include
more than 500 built - in commands.
Windows PowerShell not only allows access to the local disk drives as a file system, but it also exposes
the local Registry, certificate store, and system environment variables and allows you to navigate them
using the same familiar methods you would use for navigating a file system. Windows PowerShell also
provides additional data stores for variables, functions, and alias definitions used inside the shell.
GUI management applications can be built on top of Windows PowerShell. Software developers can
ensure that all administrative functions found in a GUI management application built on Windows
PowerShell have a corresponding scriptable equivalent in the Windows PowerShell CLI. Exchange
Management Console is an example of a GUI management application built on top of Windows
PowerShell.
PowerShell Basics
You may be asking yourself why a book about Exchange Management Shell is spending so much time in
the beginning talking about Windows PowerShell. Because Exchange Management Shell is built on top
of Windows PowerShell, you need to understand the basic concepts and components of Windows
PowerShell first.
The Command - Line Interface
Windows PowerShell operates within a hosting application. The default application is powershell.exe ,
a console application that presents a command line to the user. To start PowerShell from the Start menu
select All Programs
Windows PowerShell 1.0 Windows PowerShell. This opens Windows
PowerShell with the default console application as shown in Figure 1 - 1 .
Many first - time users of Exchange Management Shell may be confused when after opening the default
Windows PowerShell console application that they are unable to run any Exchange - specific commands.
This is because Exchange Management Shell is an extension of Windows PowerShell. The default
Windows PowerShell hosting application does not include any Exchange - specific commands. Windows
PowerShell is extended by the use of a component called a snap - in. A snap - in provides a method for
loading custom PowerShell commands and functionality contained in an application extension file.
To start Exchange Management Shell from the Start menu, select All Programs
Exchange Server 2007
Exchange Management Shell. The target definition for this program shortcut contains the following
underlying command line:
C:\WINDOWS\system32\WindowsPowerShell\v1.0\PowerShell.exe -PSConsoleFile
”C:\Program Files\Microsoft\Exchange Server\bin\exshell.psc1” -noexit -command “.
’C:\Program Files\Microsoft\Exchange Server\bin\Exchange.ps1
c01.indd 6c01.indd 6 12/17/07 3:19:24 PM12/17/07 3:19:24 PM