Sign up for Office 365
Learn more about Office 365
As an O365 Community moderator, I get a lot of questions from folks on the forums about Powershell -- how it works, what can it do, how to access it, and similar inquiries.
This quick guide will not cover general Powershell syntax and usage. For that, I would recommend consulting online resources such as Technet, or a good guide along the lines of the book I use for my reference, "Windows PowerShell 2.0: Administrator's Pocket Consultant (Microsoft Press, ISBN: 978-0-7356-2595-2).
What this post will cover are the O365-specific Powershell resources available to administrators.
There are actually two Powershell environments available to O365 administrators:
1. Microsoft Online Services Module for Windows PowerShell. This environment, which is created and set up by a downloadable executable located here, provides PowerShell access to O365-specific components, such as licenses and user management features. It also provides a set of Federation commands used when setting up Single Sign-On. You can see the entire O365-specific command set by entering the following line after launching the MSOL Module shortcut: Get-Command *MSOL*
2. Remote Exchange Powershell. The real powerhouse behind O365 Exchange Online, this environment allows you to easily accomplish complicated administrative and/or automated tasks -- often with just a single line of scripting. Everything that can be done in the Exchange Control Panel can be done with Powershell, and more. Unlike the MSOL Module's prebuilt environment (complete with shortcut), you must establish the Remote Exchange Powershell environment manually by following the instructions here. One important thing to keep in mind, however: O365 Exchange is a hosted, multi-tenant environment. Therefore, experienced admins may find that some Exchange Powershell cmdlets are missing, or work differently from how they expect. A complete list of available O365 Exchange Remote Powershell commands are listed here.
If you have any questions about specific Powershell cmdlets, please feel free to post your questions in the forums, as usual. Support is not equipped to write scripts for specific circumstances, but if you need some pointers or assistance on syntax or usage, we are there to help!
And remember, the Get-Help <name of cmdlet here> command is your friend.
1 out of 2 people found this post helpful.