Exchange 2010 - View all users deleted items folder

Hello Everyone,

I want to find out everyone's "deleted Items" folder size in exchange 2010.  When I  run the following powershell command

Get-Mailbox | Get-MailboxStatistics | sort TotalDeletedItemSize -descending | ft DisplayName,TotalDeletedItemSize, FolderPath > c:\deleteditems.csv

I get a list of their "deletions" folder and not "deleted items" folder.

Does anyone know the powershell command to view the size of everyone's "deleted items" in exchange 2010?

Thanks,

Bill
bjenningsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Patrick BogersDatacenter platform engineer LindowsCommented:
Hi

To export you need to change the "ft" to "Select-Object" afaik.
Try this

Get-Mailbox | Get-MailboxStatistics | sort TotalDeletedItemSize | Select-object DisplayName,TotalDeletedItemSize | export-csv c:\deleteditems.csv
bjenningsAuthor Commented:
Hello Patricksr1972,

Thanks for the suggestion, but it did not work.

When I run the following command:

Get-MailboxFolderStatistics -id  testuser@acme.com| Sort-Object
FolderSize -Descending | FT  folderpath, foldersize, ItemsinFolder -autosize

I get the following result

FolderPath                     FolderSize                      ItemsInFolder
----------                     ----------                      -------------
/Deleted Items              5.786 GB                          10000
/Sent Items                    2.936 GB                             40000
/Inbox/Test                    267.7 MB                               1050

When I run the command you gave me
Get-Mailbox | Get-MailboxStatistics | sort TotalDeletedItemSize | Select-object DisplayName,TotalDeletedItemSize | export-csv c:\deleteditems.csv

I get the following result for the same user

Test User      59.56 MB

I am trying to find the size of all "delete Items" folder for everyone in the company.

Thanks,

Bill
FOXActive Directory/Exchange EngineerCommented:
Are you trying to get the size of the  deleted items folder  per user or the total deleted items size of the whole company?
Minecraft_ EndermanCommented:
very very very simple

Get-Mailbox -mailboxsize unlimited| Get-MailboxFolderStatistics | ?{$_.name -like "*delete*"} | select Identity,name,FolderSize,FolderAndSubfolderSize | export-csv C:\report.csv

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bjenningsAuthor Commented:
It worked!  Thanks so much!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.