Forum Discussion

Mali_Stane's avatar
Mali_Stane
Copper Contributor
Aug 25, 2025

Get-ComplianceSearch "Search Name" | fl Items,Size,JobProgress,Status 0 Results

Hi,

Previously, I searched for the number of emails sent or received from a specific domain.

For example:

(Received>2025-01-01) AND (Received<2025-12-31) AND (Recipients:@my.domain) AND (ItemClass=IPM.Note)

 

If i go to  Statistics report I can see total matches 9551529(6 TB) total items matching the search query , Locations 1813 / 2539 locations searched had hits

If i run command : Get-ComplianceSearch "mydomain 2025"  | fl Items,Size,JobProgress,Status

I get :

Items       : 0

Size        : 0

JobProgress : 100

Status      : Completed

If I run some random small search, I get results with command Get-ComplianceSearch

Am i doing something wrong ?

 

Aditional infomation : When Content search is deleted, Export is not removed. Previously, deleting a search in classic eDiscovery would also automatically delete all exports. Currently, even manual attempts to delete exports result in an error : Request failed with status code 405

 

I have try with security admin, and other roles…

1 Reply

  • Ankit365's avatar
    Ankit365
    Brass Contributor

    You are not doing anything wrong. What you are seeing is a side effect of how Purview’s modernized eDiscovery now surfaces counts and where. Since May 26, 2025, content searches are now live inside the unified eDiscovery experience, and several PowerShell surfaces have been updated. The Items and Size fields on Get-ComplianceSearch are no longer a reliable place to read the totals for very large searches; Microsoft’s own guidance says Get-ComplianceSearch is for viewing the search definition and that you should use a preview action and then read the results with Get-ComplianceSearchAction if you want item count and total size. In practice the numbers you see in the portal’s Statistics report are authoritative for big searches, while Get-ComplianceSearch can show zero even when the portal shows millions of hits. To pull counts via PowerShell, run a preview action for your search, then call Get-ComplianceSearchAction on the “_Preview” object with details; that returns the item count and total size per Microsoft’s cmdlet documentation.

     

    Also be aware of core limits that can skew expectations, for example a single content search only includes up to 500 source mailboxes in the result set display even if more had hits, which is why the portal’s statistics view is the safer place to validate scope for huge, tenant-wide queries. On your separate point about exports not being removed when you delete the search and the 405 error when trying to delete exports manually, that aligns with the ongoing rollout of the new eDiscovery experience where export deletion behavior and PowerShell export parameters have been changing; Microsoft announced removal of certain export parameters in the content-search cmdlets and users have reported 405 errors in the portal while the “delete export” capability rolls out.

     

    If you need a clean automation path today, keep the searches inside the automatically created “Content Search” case, use the portal’s statistics for totals, use the preview action plus Get-ComplianceSearchAction when you must script counts, and if export deletion keeps failing in your tenant, open a support ticket and reference the recent eDiscovery modernization because this is a known regression during rollout rather than a permissions issue.

    Hit like if you like the solution.

Resources