Microsoft Security Tech Accelerator
Dec 06 2023, 07:00 AM - 12:00 PM (PST)
Microsoft Tech Community

Content Search & Unindexed Items

Steel Contributor

Recently, Unindexed Items have started to appear in our content searches. I believe these are most likely encryted documents? Please correct if I am mistaken. I would like to ensure that the Search & Delete process outlined here will not delete these messages.


Example search with Unindexed Items returned:




7 Replies

Encrytped or password-protected is a common scenario, unsupported file types is another one. There's a detailed article on the subject here:

@Vasil Michev I guess the problem I am running into is that I have lost the ability to exclude unindexed items as described in the article you mentioned. Now I am afraid to run the powershell commands to remove the items searched for from the users mailboxes because I do not want to remove those unindexed items that I cannot exclude from the search. 

When you run an Action against Content Search, you have the option to specify whether unindexed items are included in the scope. If you are doing this via PowerShell, the "-Scope IndexedItemsOnly" parameter is what you need. More info here:


Plus, you can always run the Export action first, so you have a backup copy if something goes wrong.

Unfortunately the "Scope" is only available on Export commands. I am trying to run a purge command and it wont accept the -Scope IndexedItemsOnly as part of the command. 


Ill redo the search using Powershell and choose not to include the unindexed items. I dont understand why this was removed from the GUI. I remember it being there before. 

Wow... I just tried to run this via powershell and the -IncludeUnindexedItems switch is not avialable there either. 


PS C:\Scripts> New-ComplianceSearch -Name "deltaphishing2" -ExchangeLocation All -IncludeUnindexedItemsEnabled False -WhatIf
A parameter cannot be found that matches parameter name 'IncludeUnindexedItemsEnabled'.
+ CategoryInfo : InvalidArgument: (:) [New-ComplianceSearch], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,New-ComplianceSearch
+ PSComputerName :



Can someone else see if they still have the ability?



The parameter is available for the "action" cmdlets, not the generic "search" ones. But you are right, it does not seem to be available for the Purge action. Here's an example for Export:


New-CComplianceSearchAction -SearchName blabla -Export -Scope UnindexedItemsOnly

best response confirmed by VI_Migration (Silver Contributor)

I FINALLY got an answer from MS Support. The purge function will never delete an unindexed item. They also have removed the ability to exlude unindexed items from search due to legal reasons. You can exclude unindexed on export, but not on search anymore like you used to be able to. 

 The following resouces detail the changes.