by

Enumerating Public Folders utilizing EWS and reporting on Guidelines and Folder Stats

Enumerating Public Folders utilizing EWS and reporting on Guidelines and Folder Stats When folks point out Public Folders in Trade a quote from Mark Twain typically involves thoughts “the reports of my death are greatly exaggerated”, one typically thinks the identical when folks write such issues about e mail.  Whereas Teams in Workplace 365 provide a compelling different, Public Folders are nonetheless issues Admins have to cope with and Migrate often.

Whereas the Trade Administration Shell cmdlets for reporting on Public Folders have improved loads in Trade 2013 you should still have the necessity sometimes to wish to do some extra in-depth evaluation of what is occurring in your Public Folders which is the place EWS can are available very helpful. The one large distinction to reporting on folders in a Public Folder Tree vs doing the identical factor in a Mailbox is that in a Public Folder tree you possibly can’t do a Deep Traversal. This implies to report on Public Folders it is advisable to enumerate the kid folders of every dad or mum folder with a separate EWS name. For very giant Public Folder bushes this may take a substantial period of time.

The next Script does this enumeration for all of the Public Folders (that the Mailbox that’s working the script) has entry to, it checks to see if there are any Guidelines which are Lively or Disabled, and likewise produces a fundamental stats report of the Variety of Gadgets, FolderSize and likewise the PidTagLocalCommitTimeMax time which ought to provide the final time the objects within the folder the place final modified. eg it produces one thing like

With this base you possibly can add-in no matter you wish to do with every folder relying in your explicit necessities.

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

To Run the script it is advisable to move in a Mailbox that is used to hook up with CAS server after which join eg

Enum-PublicFolders -MailboxName mailbox@area.com