by

Enumerating and Reporting on all Search Folders in a Mailbox or Archive with EWS and Powershell

Enumerating and Reporting on all Search Folders in a Mailbox or Archive with EWS and Powershell Search Folders are a characteristic of Alternate that lets you have a static search based mostly on a explicit standards  throughout a number of folders in a Mailbox. They’ll serve quite a lot of completely different capabilities inside a Mailbox and are sometimes used to offer a number of the backend performance of recent options.

Not one of the Alternate Administration Shell cmdlets provides you  an excellent view of the SearchFolders in a Mailbox so EWS might be explicit helpful for this. Eg I’ve put a cmdlet collectively that may enumerate all of the Search Folders in a Mailbox (or Archive is you interested by that) and produce a report of the folder variety of Objects and Dimension of these gadgets that match the Search Folder standards. It should produce a report akin to

I’ve put a replica of this script up on GitHub right here https://github.com/gscales/Powershell-Scripts/blob/grasp/SearchFoldersEnums.ps1

To Run the script use

Get-SearchFolders -MailboxName Mailbox@area.com

to Get Searchfolder from an Archive

Get-SearchFolders -MailboxName Mailbox@area.com -Archive

to make use of EWS Impersonation

Get-SearchFolders -MailboxName Mailbox@area.com -useImpersonation