(Print this page)

New article: PowerShell - Get O365 mailboxes statistics
Published date: Saturday, November 19, 2016
On: Moer and Éric Moreau's web site

I just published my latest article. And oh surprised, I will show you some PowerShell this month!

A client of mine finally switched to Office 365 last month. They started to have recurring issues with their old on premise Exchange server and going to Office 365 was a no-brainer decision.

On the previous server, because space was tight, I had a script running weekly showing the usage of all users’ mailboxes to discover who was using all the precious space. That script was built for Exchange Server 2010 and was not compatible with Office 365.

Now with the standard 50 gb of total space for each user, they have plenty of space but managers are still interested in getting statistics about the space used in Office 365 and the licensing.

When I started to look around for samples, I found snippets here and there but none were giving me all the client wanted. I found that I needed to mix many of them in order to get various pieces of information.

For example, Get-Mailbox returns a list of the mailboxes in your tenant but we need to call Get-MailboxStatistics to get the total size of an account. but I later discovered that this size does include much more than just emails (so it was a bit different from I expected). If we want a break that value down, we need to call Get-MailboxFolderStatistics to get more granular information like the number and size of emails, calendar items, and contacts. Lastly, if we are interested in licensing information, we need to call Get-MsolUser.

This current article is clearly not a full tutorial on how to use PowerShell as I am not an expert in that domain. It is the result of my experiments trying to produce some statistics putting together snippets that were working separately but not when combined all together.

You can read this article from http://emoreau.com/Entries/Articles/2016/11/PowerShell-Get-O365-mailboxes-statistics.aspx


(Print this page)