Link to home
Start Free TrialLog in
Avatar of heze54
heze54Flag for Spain

asked on

Powershell Export users by account and size

Hi,

I´d like to export a list of users by name, mail account and size to xls or csv

How to do this?


Regards
Avatar of yo_bee
yo_bee
Flag of United States of America image

This should do the trick

Get-Mailbox | Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | Select Displayname,TotalItemSize | Export-Csv -Path C:\temp\EmployeeList.csv -NoTypeInformation -Force

Open in new window

In addition, you can include "Get-Mailbox -ResultSize Unlimited" If you are having more than 1000 mailboxes.

You are looking for mail count as well.. which can be retrieved from itemcount.. On the command shared by Yo_Bee add this as well.. "Select Displayname,TotalItemSize, ItemCount"
Avatar of heze54

ASKER

Hi yo_bee,


How to add a column to show email address?


Regards
ASKER CERTIFIED SOLUTION
Avatar of yo_bee
yo_bee
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Accept: 'yo_bee' (https:#a42651149)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

seth2740
Experts-Exchange Cleanup Volunteer