SOLVED

O365 Group Mailbox Reports?

Deleted
Not applicable

I'm trying to compile a PS report that will show me the size of each group mailbox within my O365 Groups.  Get-mailboxstatistics works for individual group mailboxes using the primarysmtpaddress, Identity, ID, etc., but I want to be able get them all using the Recipienttype, RecipienttypeDetails, or even MailboxtypeDetails (which shows as 'GroupMailbox' in the get-mailboxstatistics CMDLET).

 

I've tried filtering by the above (where-object), and then piping to get-mailboxstatistics but get nothing.

 

Despite looking, I haven't seen too much on this and I am anticipating a need for it for admin purposes.

Thanks!

 

It also made me wonder about how MS is going to approach these 'group mailboxes' from a licensing standpoint, esp since we're now required to assign an Exchange Plan 2 license to our shared/resource mailboxes.

9 Replies

Adding @Tony Redmond

FWIW, exporting the groups to a CSV 1st via get-unifiedgroup, followed by an 'import-csv' and 'get-mailboxstatistics' provides a workaround. Not the most elegant, but at least I have my #'s.
If anyone has a cleaner method I'd welcome it.

$Users=Import-CSV "D:\Source\Scripts\CloudScripts\O365Groups\O365groupsreport.csv"
$Users | ForEach-Object {
get-mailboxstatistics -Identity $_.email | select displayname,primarysmtpaddress,mailboxtypedetail,itemcount,totalitemsize,deleteditemcount} | export-csv .\groupmailboxsizes.csv -NoTypeInformation
best response
Solution

The only reason you would need an EO2 license for shared/room mailbox is if you have enabled hold, and if you are applying a license anyway, you should just make it a user mailbox.

 

Onto the Groups question, you can simply use the "calculated property" method:

 

Get-UnifiedGroup  | select DisplayName,Recipient*,@{n="Size";e={(Get-MailboxStatistics $_.Identity).TotalItemSize}}

DisplayName RecipientType                  RecipientTypeDetails Size
----------- -------------                  -------------------- ----
Unified     MailUniversalDistributionGroup GroupMailbox         1.314 MB (1,377,400 bytes)
First group MailUniversalDistributionGroup GroupMailbox         7.702 MB (8,076,248 bytes)

You can add other properties as needed, but in general is better to write a proper script instead of using oneliners and the pipeline.

 

Thanks @Vasil Michev.  The license question came up because our shared/resource MBX's are on hold via the 'Unified Retention Policy' and company policy.  

 

AFAIK the Unified Retention Policy is auto-applied to all new <licensed> mailboxes.  With that in mind, does that change the licensing calculus of a group mailbox if my company is expecting its contents (including SPO site contents) to be held and discoverable?  

The basic steps are to form a collection of group mailboxes and then pipe the set to the Get-MailboxFolderStatistics cmdlet, selecting whatever properties you want to report. Something like this:

 

PS C:\temp> get-unifiedgroup |get-mailboxstatistics | select displayname, itemcount, totalitemsize

DisplayName ItemCount TotalItemSize
----------- --------- -------------
Ignite 2016       149 787.1 KB (805,989 bytes)
Managers          157 821 KB (840,711 bytes)
Board Me...       160 876.6 KB (897,682 bytes)
HR Worki...       125 548.6 KB (561,767 bytes)
The Best...       757 7.157 MB (7,504,879 b...
Mountain...       151 894.7 KB (916,189 bytes)
Corporat...        86 569.8 KB (583,499 bytes)
Stock ma...       189 1.523 MB (1,596,715 b...
Interest...       160 1.141 MB (1,196,240 b...
Sanjay P...       103 761.2 KB (779,429 bytes)
Corporat...       225 1.761 MB (1,846,095 b...
Budget P...       307 3.279 MB (3,437,958 b...
Exchange...       209 2.79 MB (2,925,231 by...
Exchange...      2389 180 MB (188,750,709 b...
EHLO Blo...       177 1.37 MB (1,437,034 by...
Technolo...       183 1.721 MB (1,804,383 b...
Company ...       161 773.1 KB (791,669 bytes)

Clearly Vasil answered before I could... In any case, I agree that the best approach is to use a more structured script to fetch and format the desired information. Take a look at the script described in the https://www.petri.com/identifying-obsolete-office-365-groups-powershell article - I bet you could repurpose it to do what you want.

Thanks a lot @Tony Redmond.  That Petri article gets me a long way toward what I was looking for - the ability to ID the predominant workload of a Group and understand better which services were generating the most groups.  

 No worries. It's amazing what a little PowerShell can do...

 

@Vasil Michev, does the EO2 license requirement for hold/retention apply to shared mailboxes created for O356 Groups and/or Teams as well?

1 best response

Accepted Solutions
best response
Solution

The only reason you would need an EO2 license for shared/room mailbox is if you have enabled hold, and if you are applying a license anyway, you should just make it a user mailbox.

 

Onto the Groups question, you can simply use the "calculated property" method:

 

Get-UnifiedGroup  | select DisplayName,Recipient*,@{n="Size";e={(Get-MailboxStatistics $_.Identity).TotalItemSize}}

DisplayName RecipientType                  RecipientTypeDetails Size
----------- -------------                  -------------------- ----
Unified     MailUniversalDistributionGroup GroupMailbox         1.314 MB (1,377,400 bytes)
First group MailUniversalDistributionGroup GroupMailbox         7.702 MB (8,076,248 bytes)

You can add other properties as needed, but in general is better to write a proper script instead of using oneliners and the pipeline.

 

View solution in original post