Forum Discussion
Deleted
Feb 08, 2018O365 Group Mailbox Reports?
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, Ide...
- Feb 08, 2018
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.
Deleted
Feb 08, 2018FWIW, 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
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