2

I'm looking for a way to find all large mail items in all mailboxes in exchange 2010. I have ran the following script that I found on this CodeTwo article:

Get-Mailbox -ResultSize Unlimited | Get-MailboxFolderStatistics -IncludeAnalysis -FolderScope All | Where-Object {$_.TopSubjectSize -gt 25MB} | Select-Object Identity, TopSubject, TopSubjectSize | Export-CSV -path "C:\report.csv" -notype

Which works great, however, I need to search mailboxes on a subdomain which the above script does not search. It searches, for example, all mailboxes in the contoso.com domain but does not search ABC.Contoso.com mailboxes?

My Exchange servers are 2010 SP3 running Powershell 2.0.

I've spent a few hours on Dr Google to no avail.

Any help greatly appreciated !

Brian

1 Answer 1

0

Have you tried to run the following to view the entire forest?
Set-AdServerSettings -ViewEntireForest $True

Technet : Set-AdServerSettings Keep in mind that you might need to be assigned permissions before you can run this cmdlet. The link for "Exchange infrastructure and PowerShell persmissions is included in the link above. Once you run this, it should allow your command to query subdomain. Otherwise, the syntax for your query is valid

1
  • Thank you very much... I needed a brain bump to use that Set-Ad command... Mar 15, 2016 at 15:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .