None of the Exchange Management Shell cmdlets gives you a good view of the SearchFolders in a Mailbox so EWS can be particular useful for this. Eg I've put a cmdlet together that will enumerate all the Search Folders in a Mailbox (or Archive is you interested in that) and produce a report of the folder number of Items and Size of those items that match the Search Folder criteria. It will produce a report such as
I've put a copy of this script up on GitHub here https://github.com/gscales/Powershell-Scripts/blob/master/SearchFoldersEnums.ps1
To Run the script use
Get-SearchFolders -MailboxName Mailbox@domain.com
to Get Searchfolder from an Archive
Get-SearchFolders -MailboxName Mailbox@domain.com -Archive
to use EWS Impersonation
Get-SearchFolders -MailboxName Mailbox@domain.com -useImpersonation
No comments:
Post a Comment