[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 313
  • Last Modified:

produce a list of all exchange mailbox users sorted by size and username

i want to produce a list of all exchange users and the size of their mailboxes
i want to use username instead of display name
and need them listed from the largest to the smallest
i tried using the following command

Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | Select-Object UserName,TotalItemSize -First 1500 | Export-CSV mailboxes.csv

this produces the report but the username fields are empty

if i change username to displayname it works but i dont want display name i need username
0
dougdog
Asked:
dougdog
  • 3
  • 2
  • 2
  • +1
1 Solution
 
jss1199Commented:
change Username to Alias
0
 
Lord_aLi112Commented:
I can confirm the username column is empty.
0
 
Will SzymkowskiSenior Solution ArchitectCommented:
Unfortunately when you are piping to get-mailboxstatistics username is not a valid a member of that cmdlet. If you pipe a command you can only display the member attributes for the last piped cmdlet. As you have listed above you are not interested in Display Name but that is the only attribute that is available for Name.

Will.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
dougdogAuthor Commented:
so how could i get a report with
username    mailbox size
0
 
Lord_aLi112Commented:
does not work with alias neither
0
 
dougdogAuthor Commented:
can confirm alias does not work
0
 
Will SzymkowskiSenior Solution ArchitectCommented:
Take a look at the following link below as it provides exactly what you are looking for. There is a little more detail than piping cmdlets. You need to create new Expressions. It is very well layed out in the document step-by-step.

http://get-exchange.blogspot.ca/2009/03/did-you-ever-needed-to-supply-list-of.html

Will.
0
 
dougdogAuthor Commented:
i will see if i can figure it out what command to use
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now