SOLVED
Home

O365 Group Mailbox Reports?

%3CLINGO-SUB%20id%3D%22lingo-sub-153839%22%20slang%3D%22en-US%22%3EO365%20Group%20Mailbox%20Reports%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-153839%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20trying%20to%20compile%20a%20PS%20report%20that%20will%20show%20me%20the%20size%20of%20each%20group%20mailbox%20within%20my%20O365%20Groups.%26nbsp%3B%26nbsp%3B%3CEM%3EGet-mailboxstatistics%3C%2FEM%3E%20works%20for%20individual%20group%20mailboxes%20using%20the%20primarysmtpaddress%2C%20Identity%2C%20ID%2C%20etc.%2C%20but%20I%20want%20to%20be%20able%20get%20them%20all%20using%20the%26nbsp%3B%3CEM%3ERecipienttype%2C%20RecipienttypeDetails%2C%3C%2FEM%3E%20or%20even%26nbsp%3B%3CEM%3EMailboxtypeDetails%3C%2FEM%3E%20(which%20shows%20as%20'GroupMailbox'%20in%20the%20get-mailboxstatistics%20CMDLET).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI've%20tried%20filtering%20by%20the%20above%20(where-object)%2C%20and%20then%20piping%20to%20get-mailboxstatistics%20but%20get%20nothing.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDespite%20looking%2C%20I%20haven't%20seen%20too%20much%20on%20this%20and%20I%20am%20anticipating%20a%20need%20for%20it%20for%20admin%20purposes.%3C%2FP%3E%0A%3CP%3EThanks!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIt%20also%20made%20me%20wonder%20about%20how%20MS%20is%20going%20to%20approach%20these%20'group%20mailboxes'%20from%20a%20licensing%20standpoint%2C%20esp%20since%20we're%20now%20required%20to%20assign%20an%20Exchange%20Plan%202%20license%20to%20our%20shared%2Fresource%20mailboxes.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-153839%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMailboxes%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%20Groups%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EReports%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-154017%22%20slang%3D%22en-US%22%3ERe%3A%20O365%20Group%20Mailbox%20Reports%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-154017%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3BNo%20worries.%20It's%20amazing%20what%20a%20little%20PowerShell%20can%20do...%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-154015%22%20slang%3D%22en-US%22%3ERe%3A%20O365%20Group%20Mailbox%20Reports%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-154015%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20a%20lot%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F64%22%20target%3D%22_blank%22%3E%40Tony%20Redmond%3C%2FA%3E.%26nbsp%3B%20That%20Petri%20article%20gets%20me%20a%20long%20way%20toward%20what%20I%20was%20looking%20for%20-%20the%20ability%20to%20ID%20the%20predominant%20workload%20of%20a%20Group%20and%20understand%20better%20which%20services%20were%20generating%20the%20most%20groups.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-153994%22%20slang%3D%22en-US%22%3ERe%3A%20O365%20Group%20Mailbox%20Reports%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-153994%22%20slang%3D%22en-US%22%3E%3CP%3EClearly%20Vasil%20answered%20before%20I%20could...%20In%20any%20case%2C%20I%20agree%20that%20the%20best%20approach%20is%20to%20use%20a%20more%20structured%20script%20to%20fetch%20and%20format%20the%20desired%20information.%20Take%20a%20look%20at%20the%20script%20described%20in%20the%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.petri.com%2Fidentifying-obsolete-office-365-groups-powershell%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.petri.com%2Fidentifying-obsolete-office-365-groups-powershell%3C%2FA%3E%20article%20-%20I%20bet%20you%20could%20repurpose%20it%20to%20do%20what%20you%20want.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-153969%22%20slang%3D%22en-US%22%3ERe%3A%20O365%20Group%20Mailbox%20Reports%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-153969%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20basic%20steps%20are%20to%20form%20a%20collection%20of%20group%20mailboxes%20and%20then%20pipe%20the%20set%20to%20the%20%3CEM%3EGet-MailboxFolderStatistics%3C%2FEM%3E%20cmdlet%2C%20selecting%20whatever%20properties%20you%20want%20to%20report.%20Something%20like%20this%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3EPS%20C%3A%5Ctemp%26gt%3B%20get-unifiedgroup%20%7Cget-mailboxstatistics%20%7C%20select%20displayname%2C%20itemcount%2C%20totalitemsize%0A%0ADisplayName%20ItemCount%20TotalItemSize%0A-----------%20---------%20-------------%0AIgnite%202016%20%20%20%20%20%20%20149%20787.1%20KB%20(805%2C989%20bytes)%0AManagers%20%20%20%20%20%20%20%20%20%20157%20821%20KB%20(840%2C711%20bytes)%0ABoard%20Me...%20%20%20%20%20%20%20160%20876.6%20KB%20(897%2C682%20bytes)%0AHR%20Worki...%20%20%20%20%20%20%20125%20548.6%20KB%20(561%2C767%20bytes)%0AThe%20Best...%20%20%20%20%20%20%20757%207.157%20MB%20(7%2C504%2C879%20b...%0AMountain...%20%20%20%20%20%20%20151%20894.7%20KB%20(916%2C189%20bytes)%0ACorporat...%20%20%20%20%20%20%20%2086%20569.8%20KB%20(583%2C499%20bytes)%0AStock%20ma...%20%20%20%20%20%20%20189%201.523%20MB%20(1%2C596%2C715%20b...%0AInterest...%20%20%20%20%20%20%20160%201.141%20MB%20(1%2C196%2C240%20b...%0ASanjay%20P...%20%20%20%20%20%20%20103%20761.2%20KB%20(779%2C429%20bytes)%0ACorporat...%20%20%20%20%20%20%20225%201.761%20MB%20(1%2C846%2C095%20b...%0ABudget%20P...%20%20%20%20%20%20%20307%203.279%20MB%20(3%2C437%2C958%20b...%0AExchange...%20%20%20%20%20%20%20209%202.79%20MB%20(2%2C925%2C231%20by...%0AExchange...%20%20%20%20%20%202389%20180%20MB%20(188%2C750%2C709%20b...%0AEHLO%20Blo...%20%20%20%20%20%20%20177%201.37%20MB%20(1%2C437%2C034%20by...%0ATechnolo...%20%20%20%20%20%20%20183%201.721%20MB%20(1%2C804%2C383%20b...%0ACompany%20...%20%20%20%20%20%20%20161%20773.1%20KB%20(791%2C669%20bytes)%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-153963%22%20slang%3D%22en-US%22%3ERe%3A%20O365%20Group%20Mailbox%20Reports%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-153963%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E.%26nbsp%3B%20The%20license%20question%20came%20up%20because%20our%20shared%2Fresource%20MBX's%26nbsp%3B%3CEM%3Eare%3C%2FEM%3E%20on%20hold%20via%20the%20'Unified%20Retention%20Policy'%20and%20company%20policy.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAFAIK%20the%20Unified%20Retention%20Policy%20is%20auto-applied%20to%20all%20new%20%3CLICENSED%3E%20mailboxes.%26nbsp%3B%26nbsp%3BWith%20that%20in%20mind%2C%20does%20that%20change%20the%20licensing%20calculus%20of%20a%20group%20mailbox%20if%20my%20company%20is%20expecting%20its%20contents%20(including%20SPO%20site%20contents)%20to%20be%20held%20and%20discoverable%3F%26nbsp%3B%26nbsp%3B%3C%2FLICENSED%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-153951%22%20slang%3D%22en-US%22%3ERe%3A%20O365%20Group%20Mailbox%20Reports%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-153951%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20only%20reason%20you%20would%20need%20an%20EO2%20license%20for%20shared%2Froom%20mailbox%20is%20if%20you%20have%20enabled%20hold%2C%20and%20if%20you%20are%20applying%20a%20license%20anyway%2C%20you%20should%20just%20make%20it%20a%20user%20mailbox.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnto%20the%20Groups%20question%2C%20you%20can%20simply%20use%20the%20%22calculated%20property%22%20method%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3EGet-UnifiedGroup%20%20%7C%20select%20DisplayName%2CRecipient*%2C%40%7Bn%3D%22Size%22%3Be%3D%7B(Get-MailboxStatistics%20%24_.Identity).TotalItemSize%7D%7D%0A%0ADisplayName%20RecipientType%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20RecipientTypeDetails%20Size%0A-----------%20-------------%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20--------------------%20----%0AUnified%20%20%20%20%20MailUniversalDistributionGroup%20GroupMailbox%20%20%20%20%20%20%20%20%201.314%20MB%20(1%2C377%2C400%20bytes)%0AFirst%20group%20MailUniversalDistributionGroup%20GroupMailbox%20%20%20%20%20%20%20%20%207.702%20MB%20(8%2C076%2C248%20bytes)%3C%2FPRE%3E%0A%3CP%3EYou%20can%20add%20other%20properties%20as%20needed%2C%20but%20in%20general%20is%20better%20to%20write%20a%20proper%20script%20instead%20of%20using%20oneliners%20and%20the%20pipeline.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-153944%22%20slang%3D%22en-US%22%3ERe%3A%20O365%20Group%20Mailbox%20Reports%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-153944%22%20slang%3D%22en-US%22%3EFWIW%2C%20exporting%20the%20groups%20to%20a%20CSV%201st%20via%20get-unifiedgroup%2C%20followed%20by%20an%20'import-csv'%20and%20'get-mailboxstatistics'%20provides%20a%20workaround.%20%20Not%20the%20most%20elegant%2C%20but%20at%20least%20I%20have%20my%20%23's.%3CBR%20%2F%3EIf%20anyone%20has%20a%20cleaner%20method%20I'd%20welcome%20it.%3CBR%20%2F%3E%3CBR%20%2F%3E%24Users%3DImport-CSV%20%22D%3A%5CSource%5CScripts%5CCloudScripts%5CO365Groups%5CO365groupsreport.csv%22%3CBR%20%2F%3E%24Users%20%7C%20ForEach-Object%20%7B%3CBR%20%2F%3Eget-mailboxstatistics%20-Identity%20%24_.email%20%7C%20select%20displayname%2Cprimarysmtpaddress%2Cmailboxtypedetail%2Citemcount%2Ctotalitemsize%2Cdeleteditemcount%7D%20%7C%20export-csv%20.%5Cgroupmailboxsizes.csv%20-NoTypeInformation%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-153930%22%20slang%3D%22en-US%22%3ERe%3A%20O365%20Group%20Mailbox%20Reports%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-153930%22%20slang%3D%22en-US%22%3E%3CP%3EAdding%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F64%22%20target%3D%22_blank%22%3E%40Tony%20Redmond%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-755168%22%20slang%3D%22en-US%22%3ERe%3A%20O365%20Group%20Mailbox%20Reports%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-755168%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%2C%20does%20the%20EO2%20license%20requirement%20for%20hold%2Fretention%20apply%20to%20shared%20mailboxes%20created%20for%20O356%20Groups%20and%2For%20Teams%20as%20well%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
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
Highlighted

Adding @Tony Redmond

Highlighted
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
Highlighted
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.

 

Highlighted

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?  

Highlighted

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)
Highlighted

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.

Highlighted

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.  

Highlighted

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

 

Highlighted

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

Related Conversations
Report for Videoconferencing quality
Thomas_Steibl in Microsoft Teams on
3 Replies
Azure Reporting
Christian Taveras in Azure on
1 Replies
AD User Migration Exchange Mailbox last
Hermulus in Exchange on
1 Replies
Tenant to Tenant Migration.
Aneesh3211 in Office 365 on
4 Replies