Jun 06 2017
11:18 PM
- last edited on
Feb 19 2021
04:48 AM
by
TechCommunityAP
Jun 06 2017
11:18 PM
- last edited on
Feb 19 2021
04:48 AM
by
TechCommunityAP
The question of "can I search for items in specific folder only" is often brough up when using eDiscovery or the Search-Mailbox cmdlet. Well, finally we have an option to do so, via the so-called targetted collections.
In a nutshell, you provide the binary-encoded folderId and use it as you would use any other search property. It's not as easy as it sounds though, as the folderId property you get from the output of cmdlets such as Get-MailboxFolderStatistics is not suitable and it has to be transformed via some PowerShell magic. Makes me wonder why they didnt simply perform this conversion after you specify the id, but anyways.
Here's an example of two searches running against my mailbox: one including all content and the other one scoped to a folder. You can see that the results returned by the second search match the folder statistics. The number/size of unindexed items found matches across the searches, so you can be sure this is the same mailbox :)
Details are here: https://support.office.com/en-us/article/Use-Content-Search-in-Office-365-for-targeted-collections-e...