Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

get shared mailbox powershell exchange 2010

$Mailboxes = Get-Mailbox -RecipientTypeDetails SharedMailbox
foreach ($Mailbox in $Mailboxes)
{
$Mailbox | Add-Member -MemberType “NoteProperty” -Name “MailboxSizeMB” -Value ((Get-MailboxStatistics $Mailbox).TotalItemSize.Value.ToMb())
$Mailbox | Add-Member -MemberType “NoteProperty” -Name “ItemCount” -Value ((Get-MailboxStatistics $Mailbox).ItemCount)
}
$Mailboxes | Sort-Object MailboxSizeMB -Desc | Select DisplayName,PrimarySMTPAddress,MailboxSizeMB,ItemCount,SamAccountName | Export-Csv -NoType “C:Mailboxessize.csv”
Source by social.technet.microsoft.com #
 
PREVIOUS NEXT
Tagged: #shared #mailbox #powershell #exchange
ADD COMMENT
Topic
Name
6+3 =