Introduction
Microsoft introduced some radical architectural changes in Exchange 2007, including a brand new set of management tools. PowerShell v1, along with an additional set of exchange specific cmdlets, finally gave administrators an interface that could be used to manage the entire product from a command line shell. This was an interesting move, as was the fact that the entire graphical management console was built on top of this technology. Any tasks performed from the graphical interface, known as the Exchange Management Console , were translated into PowerShell commands that were carried out in the background. This meant that for the first time, administrators could completely automate anything that could be done from the graphical console using this new command line interface called the Exchange Management Shell. This was a total departure from how the management tools worked in previous versions of Exchange, but it finally provided the automation capabilities that had been desired by many people for several years.
This same architecture still exists with this latest version of Exchange, and PowerShell is even more tightly integrated with the product. Of course, there are many new cmdlets and core functionality changes. Exchange 2010 uses PowerShell v2, and relies heavily on its new remoting infrastructure. This provides seamless administrative capabilities from a single seat with the Exchange Management Tools, whether your servers are on premise or in the cloud.
Even if you've worked with the Exchange Management Shell previously, the syntax used with some of the existing cmdlets has changed in Exchange 2010, and the new remoting functionality has introduced some changes that you'll want to be aware of.
In this chapter, we'll cover these topics, as well as common tasks that will allow you to effectively write scripts with this latest release. We'll also take a look at some general tasks such as scheduling scripts, sending e-mails, generating reports, and more.
Performing some basic steps
To make use of all the examples in this chapter, we'll need to use the Exchange Management Shell, the Exchange Management console, and a standard PowerShell v2 console.
You can launch the Exchange Management Shell or the Exchange Management Console by using the following steps:
- Log onto a workstation or server with the Exchange Management Tools installed
- Open the Exchange Management Shell by clicking on Start | All Programs | Exchange Server 2010
- Click on the Exchange Management Shell or the Exchange ManagementConsole shortcut
To launch a standard PowerShell console, use the following steps:
- On Windows Vista, Windows 7, or Windows Server 2008, open a standard PowerShell console by clicking on Start | All Programs | Accessories, click on the Windows PowerShell folder, and then click the Windows PowerShell shortcut.
- On Windows XP and Windows Server 2003, click on Start | Programs | Accessories, click on the Windows PowerShell folder, and then click the Windows PowerShell shortcut.
Note
Unless specified otherwise in the Getting ready section, all of the recipes in this chapter will require the use of the Exchange Management Shell.