diff --git a/Exchange/Get-LargeMailboxes.ps1 b/Exchange/Get-LargeMailboxes.ps1 new file mode 100644 index 0000000..e56623e --- /dev/null +++ b/Exchange/Get-LargeMailboxes.ps1 @@ -0,0 +1,4 @@ +#Find mailboxes that are larger than 100GB (for migrating to exchange online) +Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Where-Object { + [int64]($_.TotalItemSize.Value.ToBytes()) -gt 100GB +} | Select DisplayName, @{Name="SizeGB";Expression={"{0:N2}" -f ($_.TotalItemSize.Value.ToBytes()/1GB)}}