Determine which cmdlets are available to Exchange Online administrators with Office 365 PowerShell

 

Applies to: Exchange Online

Topic Last Modified: 2016-08-16

Use Office 365 PowerShell to figure out which cmdlets are available to Exchange Online administrators.

Help topics for all the cmdlets available to Exchange Online administrators can be found in two different places. First, there are about 40 or so cmdlets that can be used only with Exchange Online. This set of cmdlets will not work with the on-premises version of Exchange Server. Those cmdlets are documented here.

However, the vast majority of the cmdlets available to Exchange Online administrators can also be used with the on-premises version of Exchange Server. All of those cmdlets can be found here. How do you know which of these cmdlets can be used with Exchange Online and which ones can’t?

One way is to take a look at the documentation for a given cmdlet. If Exchange Online is in the Applies to list at the top of the article, the cmdlet applies to Exchange Online.

Another way is to list the cmdlets after connecting to Exchange Online.

Before you get started using Office 365 PowerShell to manage Exchange Online, make sure that you have connected to Exchange Online PowerShell. For more information, see Connect to Exchange Online PowerShell.

After connecting to Exchange Online, you can list the cmdlets available to you with these commands:

$mods=Get-Module | where {$_.Name -like "tmp_*"}; $modName=$mods.Name
Get-Command -Module $modName | More

Note that these commands first obtain the name of the module for the Exchange Online cmdlets, which changes every time you connect to Exchange Online, and then displays the commands one page at a time. To stop paging through screen after screen of cmdlet names, just press Ctrl-C to exit.

If you’re just interested in a certain subset of cmdlets (say, all the cmdlets for disabling things) you can use the wildcard character (*) to filter cmdlets based on the cmdlet name. For example, this command returns only the Exchange Online cmdlets that start with the word Disable:

Get-Command -Name "Disable*" -Module $modName 

This command displays something similar to the following (your ModuleName will be different):

CommandType     Name                             ModuleName
-----------     ----                             ----------
Function        Disable-App                      tmp_lqy0pg2k.aij
Function        Disable-HostedContentFilterRule  tmp_lqy0pg2k.aij
Function        Disable-InboxRule                tmp_lqy0pg2k.aij
Function        Disable-JournalRule              tmp_lqy0pg2k.aij
Function        Disable-Mailbox                  tmp_lqy0pg2k.aij
Function        Disable-MailPublicFolder         tmp_lqy0pg2k.aij
Function        Disable-MalwareFilterRule        tmp_lqy0pg2k.aij
Function        Disable-OutlookProtectionRule    tmp_lqy0pg2k.aij
Function        Disable-TransportRule            tmp_lqy0pg2k.aij
Function        Disable-UMAutoAttendant          tmp_lqy0pg2k.aij
Function        Disable-UMCallAnsweringRule      tmp_lqy0pg2k.aij
Function        Disable-UMIPGateway              tmp_lqy0pg2k.aij
Function        Disable-UMMailbox                tmp_lqy0pg2k.aij

As another example, this command returns only those cmdlets that include the word Junk somewhere in the cmdlet name:

Get-Command -Name "*Junk*" -Module $modName 

This command returns something similar to the following:

CommandType     Name                               ModuleName
-----------     ----                               ----------
Function        Get-MailboxJunkEmailConfiguration  tmp_lqy0pg2k.aij
Function        Set-MailboxJunkEmailConfiguration  tmp_lqy0pg2k.aij
 
Show: