Using PowerShell with Exchange 2016 (Exchange Management Shell)
Applies to: Exchange Server 2016
Learn about Exchange PowerShell, also known as the Exchange Management Shell. This topic describes how the Exchange PowerShell works, and it provides links to other topics that can help you learn how to use Exchange.
Exchange Server 2016 Exchange Management Shell is built on Windows PowerShell technology and provides a powerful command-line interface that enables automation of administrative tasks. You can use the Exchange Management Shell to manage every aspect of Exchange. For example, you can create email accounts, create Send and Receive connectors, configure mailbox database properties, and manage distribution groups. You can use the Exchange Management Shell to perform every task that's available in the Exchange admin center (EAC), plus things that you can't do in the EAC, like bulk operations. In fact, when you do something in the EAC, it's the Exchange Management Shell that does the work behind the scenes.
The Exchange Management Shell also provides a robust and flexible scripting platform. Visual Basic scripts that required many lines of code can be replaced by Exchange Management Shell commands that use as little as one line of code. The Exchange Management Shell provides this flexibility because it uses an object model that's based on the Microsoft .NET Framework. This object model enables Exchange cmdlets to apply the output from one command to subsequent commands.
To start using the Exchange Management Shell immediately, see the Exchange Management Shell documentation section later in this topic.
Whether you use the Exchange Management Shell on a local Exchange 2016 Mailbox server or on a Mailbox server that's located across the country, remote PowerShell does the work.
When you click the Exchange Management Shell shortcut on an Exchange 2016 Mailbox server, the local instance of Windows PowerShell performs the following steps:
Connect to the closest Exchange 2016 Mailbox server (most often, the local Exchange server) using a required Windows PowerShell component called Windows Remote Management (WinRM).
Perform authentication checks.
Create a remote PowerShell session for you to use.
You only get access to the Exchange cmdlets and parameters that are associated with the Exchange management role groups and management roles you're assigned. For more information about how Exchange uses role groups and roles to manage who can do what tasks, see Permissions.
A benefit of remote PowerShell is that you can use Windows PowerShell on a local computer to connect to a remote Exchange 2016 server, and import the Exchange cmdlets in the Windows PowerShell session so you can administer Exchange. The only requirements for the computer are:
A supported operating system for Exchange 2016.
A supported version of the .NET Framework.
A supported version of the Windows Management Framework (WMF), which includes WinRM and Windows PowerShell.
For details, see Exchange 2016 system requirements.
However, we recommend that you install the Exchange management tools (which includes the Exchange Management Shell) on any computer that you use to extensively manage Exchange 2016. Without the Exchange management tools installed, you need to connect to the remote Exchange 2016 server manually, and you don't have access to the additional capabilities that the Exchange management tools provide.
For more information about connecting to Exchange 2016 servers without the Exchange management tools installed, see Connect to Exchange servers using remote PowerShell.
On Edge Transport servers, the Exchange Management Shell works differently. You typically deploy Edge Transport servers in your perimeter network, either as stand-alone servers or as members of a perimeter Active Directory domain.
When you click the Exchange Management Shell shortcut on an Exchange 2016 Edge Transport server, the local instance of Windows PowerShell creates a local PowerShell session for you to use.
Edge Transport servers don't use management roles or management role groups to control permissions. The local Administrators group controls who can configure the Exchange features on the local server.
For more information about Edge Transport servers, see Edge Transport servers.
The following table provides links to topics that can help you learn about and use the Exchange Management Shell.
How to find and open the Exchange Management Shell on an Exchange server or a computer that has the Exchange management tools installed.
How to use Windows PowerShell on a local computer to connect to an Exchange server.
How to find the permissions you need to run a specific cmdlet, or one or more parameters on the cmdlet.