Essential Guide

Get started Bring yourself up to speed with our introductory content.

The essential guide to PowerShell in Exchange

Administrators looking to get the most out of PowerShell in Exchange must learn how the scripting language works in multiple versions of the messaging system, including Exchange 2007, Exchange 2010 and Exchange 2013.


Microsoft PowerShell is one of the most powerful tools Exchange admins can have in their tool belts. By using the command line, admins can automate a number of tasks and exercise greater control over what end users can access within the organization.

This guide will help admins gain a better understanding of PowerShell in Exchange Server and how to harness the scripting language's potential in multiple iterations of the messaging system. Admins will learn some of the basic skills they should have, cmdlets to use for specific tasks, the best way to approach scripting certain management tasks and more.

1Scripting in Exchange 2007-

PowerShell in Exchange 2007

The Exchange Management Shell (EMS), which was introduced in Exchange 2007, was built on top of PowerShell and allows admins to manage every aspect of the server from the command line. The EMS can perform any task normally performed in the Exchange Management Console (EMC), including enabling new accounts and configuring properties to automate certain managerial tasks. This section can help admins learn the basics of using EMS as well as helpful commands for common tasks such as controlling search results and generating HTML reports.


Exchange Management Shell basics

Although most administrative tasks can be completed through Exchange's graphical user interface (GUI), the EMS lets admins perform tasks that cannot be completed through the EMC. This feature breaks down the basic syntax of EMS and how to perform common commands. Continue Reading


Using the EMS Filter command to control search results

Commands in EMS can return thousands of search results, making it difficult for admins to find the right information. The Filter command controls the results that are displayed. Continue Reading


Dig deeper into search results with the Format command

The Filter command may not return the exact data admins want. But when used in conjunction with a specific symbol, the Format command adds more control to what information is displayed when a query is executed. Continue Reading


Testing and previewing EMS commands

A single command in the EMS can make drastic changes to an entire Exchange deployment, so admins need to be comfortable using commands. This feature explores how to test and preview EMS commands before executing them. Continue Reading


Configure Exchange mailboxes to block specific senders

With a basic understanding of EMS under their belts, admins can learn how to use the Set command to create a list of blocked mail senders and recipients. Continue Reading


Create HTML reports with the EMS

Admins can use EMS commands to extract mailbox statistics from Exchange 2007, but the process involves bulky commands and reports that aren't universally usable. This feature shows how to extract mailbox data and export it into an HTML format. Continue Reading


How one cmdlet can ease domain controller workloads

Active Directory (AD) requests can overload domain controllers, but this cmdlet can help lessen workloads and protect DCs from additional stress. This feature explains the parameters that the command can be used in conjunction with to control which DCs Exchange Server uses. Continue Reading

2Scripting in Exchange 2010-

PowerShell in Exchange 2010

The EMS appears again in Exchange 2010, but it includes new capabilities and roles, including role-based access control. As in Exchange 2007, admins can only perform certain tasks from the command line, but PowerShell is still a valuable asset for those who want to create and execute a plan for a successful Exchange 2010 migration. Once an admin has a basic understanding of EMS, there are some additional tools to ease Exchange management and help you prepare for and complete a successful migration to Exchange 2010.


Use PowerShell to prepare AD for Exchange 2010 migrations

Before migrating to Exchange Server 2010, the AD setup must meet certain prerequisites. These PowerShell cmdlets will help verify that everything is in working order and prepare the AD forest for the move. Continue Reading


Complete your Exchange 2010 migration with PowerShell

The next step after prepping the AD for Exchange 2010 is to move public folders, PST data and mailboxes over to the new servers. It's easier to complete these steps using EMS commands rather than the GUI because admins can perform bulk moves with a single line of code. Continue Reading


Exchange 2010 EMS essentials

Microsoft has positioned PowerShell as the administrative tool of choice, so it's important that admins become familiar with basic EMS functionality or risk being left behind. Continue Reading


Establish remote EMS connections with WinRM and PowerShell

Microsoft built EMS on top of PowerShell 2.0 and WinRM in Exchange 2010, allowing admins to perform tasks on remote servers without having to install Exchange tools on local systems. Continue Reading


Set execution policies to protect servers

PowerShell scripts can expose servers to malware, but Exchange 2010 uses execution policies to control whether scripts are allowed to run. Admins can view their execution policy with one simple EMS command. Continue Reading


Prep Exchange 2010 for reusable scripts

Reusable PowerShell scripts can save time, but many admins struggle with how to write them and how to set up their EMS environments. This tip breaks down how to create and test reusable scripts, as well as other ways to smooth the process. Continue Reading


Is throttling PowerShell in Exchange 2010 a good idea?

Throttling PowerShell can help admins achieve more control over usage and avoid performance problems end users may cause when establishing multiple sessions with the Exchange 2010 server. Continue Reading

3Scripting in Exchange 2013-

PowerShell in Exchange 2013

A strong PowerShell background is important for admins to effectively manage an Exchange 2013 deployment, especially since they can't perform a number of tasks -- establishing remote sessions and running commands within commands -- through the GUI. In addition, admins have to adjust to the lack of public folder databases.

Despite these changes, admins can still take full advantage of PowerShell to manage roles and perform routine management tasks. This section explores essential techniques for managing Exchange 2013 and walks through the cmdlets to help monitor the health of servers and diagnose problems with ActiveSync.


Control RBAC in Exchange 2013 with PowerShell

With nearly a dozen built-in role groups in Exchange 2013, PowerShell cmdlets are an essential part of managing the RBAC role. This tip outlines the commands necessary for admins to verify group memberships and role assignments. Continue Reading


Use PowerShell for Exchange 2013 RBAC permissions

RBAC's Management Scopes are useful to admins because they simplify how admins can set up a number of management tasks while also allowing admins to set limits on the kinds of cmdlets end users can access. Continue Reading


PowerShell management techniques for Exchange 2013

Proficiency in PowerShell is important for admins since many management tasks in Exchange 2013 can't be performed through the GUI. This tip looks at the five techniques every admin should have in their toolbox. Continue Reading


New PowerShell cmdlets for Exchange 2013

Of the 187 new PowerShell cmdlets in Exchange 2013, these 10 cmdlets are the ones admins should pay the most attention to. Admins should also be aware that several legacy cmdlets have been retired. Continue Reading


PowerShell changes for public folders

When Microsoft built Exchange 2013, it retired several public-folder-related cmdlets from Exchange 2010. These cmdlets were left out because Microsoft changed how public folders work and Exchange 2013 no longer includes public folder databases. Continue Reading

4Must-know PowerShell terms-

Essential terms for PowerShell in Exchange

To master PowerShell in Exchange, admins must have a firm grasp on more than just the technology surrounding the scripting language -- they must also know the terminology. Here are some of the essential terms admins should know to better understand how PowerShell fits in to Exchange Server.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.