Finding hidden email folders

Copper Contributor

Hi all!

 

I have discovered that it is possible to hide email folders in Exchange using property “0x10F4000B” and setting the value to “true”.

 

Is it possible to scan through all the email accounts in the whole organization using powershell and identify all hidden folders? I would like to have it generated in a csv file, with the email account and the path of the hidden folder.

 

Thanks! 

 

Best Regards,

Kelvin Teo

2 Replies
Depends on what you understand as PowerShell :)
The built-in cmdlets do not expose this property, afaik. You can however use an EWS-based script or the Outlook object model, here's a sample solution written by Diane: https://www.slipstick.com/outlook/delete-outlooks-default-folders/#ps
Oh, and I always forget about Graph - the LIST mail folders method therein has a parameter to include hidden folders (?includeHiddenFolders=true)

https://learn.microsoft.com/en-us/graph/api/user-list-mailfolders?view=graph-rest-1.0&tabs=http