
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-Server-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, and at that time, the entire graphical management console was built on top of this technology.
The same architecture still existed with Exchange 2010, and PowerShell was even more tightly integrated with this product. Exchange 2010 used PowerShell v2, which relied 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-premises or in the cloud.
Initially, with Exchange 2013, PowerShell Version 3 was used, but now when using PowerShell Version 5 together with cumulative updates, there are a lot of new cmdlets, core functionality changes, and even more integrations with the cloud services. When Exchange 2013 was introduced (RTM), we had 764 cmdlets and after application of Service Pack 1 and Cumulative Update 7, a total of 806 Exchange cmdlets are available. This demonstrates more features and functionalities have been added over time.
In this chapter, we'll cover some of the most common 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 many 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 console.
You can launch the Exchange Management Shell using the following steps:
- Log on to a workstation or server with the Exchange Management Tools installed.
- Open the Exchange Management Shell by navigating to Start | All Programs | Exchange Server 2013.
- Click on the Exchange Management Shell shortcut.
To launch a standard PowerShell console, use the following steps:
- On Windows 8 or Windows 8.1, click on the Windows button, and select Windows PowerShell under Windows System.
- On Windows Vista, Windows 7, or Windows Server 2008 R2, open a standard PowerShell console by navigating to Start | All Programs | Accessories, click on the
Windows PowerShell
folder, and then click on the Windows PowerShell shortcut. - On Windows XP and Windows Server 2003, navigate to Start | Programs | Accessories, click on the
Windows PowerShell
folder, and then click on the Windows PowerShell shortcut.
Tip
Remember to start the Exchange Management Shell using Run as administrator to avoid permission problems. In the chapter, notice that in the examples of cmdlets, I have used the back tick (`) character to break up long commands into multiple lines. The purpose is to make it easier to read. The back ticks are not required and should only be used if needed.