Avatar of kuzum
kuzum
 asked on

powershell command

Hi,

I need a power shell command to list largest top 100 mailbox that has largest "sent items"  folder size sorted by mailbox name,

we have exchange 2010 environment

thanks everyone
Kuzum
Microsoft Legacy OSMicrosoft Server OSExchange

Avatar of undefined
Last Comment
kuzum

8/22/2022 - Mon
Manpreet SIngh Khatra

Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | Select-Object DisplayName, TotalItemSize -First 100

http://myitforum.com/cs2/blogs/yli628/archive/2008/05/06/powershell-script-to-list-the-top-10-mailbox-user-on-your-exchange-2007-server.aspx

- Rancy
kuzum

ASKER
thanks Rancy, this will show size of the mailbox but I need only the "sen items" folder size. Can you amend this to give the result I need please

Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | Select-Object DisplayName, TotalItemSize -First 100
Manpreet SIngh Khatra

Get-Mailbox -ResultSize Unlimited | Get-MailboxFolderStatistics |Sort-Object SentItems -Descending | Select-Object DisplayName, TotalItemSize, SentItems -First 100

- Rancy
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
SubSun

Try..
Get-Mailbox -ResultSize Unlimited | Get-MailboxFolderStatistics -FolderScope 'SentItems' | Sort-Object FolderSize -Descending | Select-Object -First 100 Identity, FolderPath, ItemsInFolder, FolderSize

Open in new window

kuzum

ASKER
Subsun

this is great, Can I export this to a excel file?
ASKER CERTIFIED SOLUTION
SubSun

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Manpreet SIngh Khatra

Good to see my initial command reworked couldnt have asked better :)

- Rancy
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
kuzum

ASKER
Great solution