One of the more common questions I get when migrating clients up to Exchange Online is where can they view mailbox size information for all of the users online.  This is typically more often asked during Exchange on-premises migrations where administrators are used to being able to retrieve that information from the Exchange Command Shell.

Unfortunately the Microsoft Online Services Administration Center (MOAC) does not show this information anywhere in the online console, but it can be retrieved for hosted mailboxes in BPOS by using the Migration Command Shell.

If you haven’t already downloaded these tools, you should. Even if you don’t require the Migration Console for moving mail from an on-premises Exchange or hosted IMAP/POP mail server, the Migration Command Shell is an very handy tool for any BPOS customers both during migration and afterwards for managing the environment.  There are a number of features that previously were either unavailable in BPOS or required a service ticket to be opened to be accomplish, yet now are available directly to the administrator via PowerShell cmdlets.

The toolset can be downloaded in either a 32-bit or 64-bit version directly from either of these links and installed on either desktop or server operating systems.  You may also need to install the prerequisite PowerShell 1.0 software depending on the current operating system.

Microsoft Online Services Migration Tools (32-bit)

Microsoft Online Services Migration Tools (64-bit)

Once the tools are installed check ‘All Programs’ for the shortcut at Microsoft Online Services > Migration > Migration Command Shell.  Once the command is launched the easiest way to retrieve data like the mailbox size is to use a pair of commands: one to temporarily store your administrator credentials and another to lookup a specific mailbox.  Then the second command can be re-run on other users without having to continually re-enter your credentials.

The Cmdlets

Start with the first cmdlet which creates a variable ($cred) and then prompts for a username and password to store.  Any account which is configured as an administrator in BPOS would be entered here.

$cred = Get-Credential


Then the main cmdlet is used to check a specific user account and call the previously stored credentials to be used to authenticate against Exchange Online.  Only the –SourceIdentity value needs to be set differently than this example as all North American BPOS customers would use the alias to make the WebDAV connection to. (EMEA customers would use red002 and APAC customer red003.)  The SourceDetail switch is very important as without it connection will be not be attempted and the cmdlet will appear to work but just a bunch of default and null values will be returned.

Get-XsHostedExchangeMailbox -SourceServer -SourceIdentity -SourceAdminCredential $cred -SourceDetail Full


Highlighted above are the StorageByteSize and ItemCount values for the queried mailbox.

Eventually the Get-MSOnlineUser cmdlet is supposed to be updated to return this information, which will make it even easier (and faster) since it will use native MSOL technology instead of WebDAV to retrieve the information.

By Jeff Schertz

Site Administrator

Leave a Reply

Your email address will not be published. Required fields are marked *