I an trying to get the usernames and mailbox size corresponding to all mailboxes on an Exchange 2003 server.
I've got this:
Get-WMIObject -namespace root\MicrosoftExchangeV2 -class Exchange_Mailbox -computer r2d2 | sort-object MailboxDisplayName | Sort-Object Size -Descending | format-table MailboxDisplayName,Size
It works great, but I like to change the MailboxDisplayName to something that gives me the UserName/samAccountName instead.
Is it possible?