As well as Mailboxes and Archives, Public Folders are another place you may want to use EWS to enumerate Items to do some enhanced reporting. Building on the Enumerate script from the last two post, this post will cover how to modify this script to enable access Public Folder and Public Folder Items. EWS Changes To change the Mailbox code we have to access public folders requires one big change in the Mailbox script we have the line $folderid = new-object Microsoft.Exchange.WebServices.Data.FolderId( [Microsoft.Exchange.WebServices.Data.WellKnownFolderName] :: MsgFolderRoot, $SmtpAddress ) in the FolderIdFromPath function. To access a Public folder we need to change this to $folderid = new-object Microsoft.Exchange.WebServices.Data.FolderId( [Microsoft.Exchange.WebServices.Data.WellKnownFolderName] :: PublicFoldersRoot) And that's pretty much it apart from renaming the function to PublicFolderIdFromPath this is all you have to do. One thing you can't do w
Pushing the Envelope in Messaging and Office 365 Development