---
title: "Get-ComplianceSearch: Check Content Search Results"
meta_title: "Get-ComplianceSearch: Check Content Search Results"
slug: get-compliancesearch-powershell
published: 2026-11-26T00:00:00.000Z
updated: 2026-11-26T00:00:00.000Z
feature_image: /blog/images/get-compliancesearch-powershell/get-compliancesearch-powershell-syntax-microsoft-learn.1600.webp
feature_image_alt: Microsoft Learn documentation for the Get-ComplianceSearch cmdlet showing its PowerShell syntax
author: James Futhey
author_slug: james
meta_description: "View compliance searches with Get-ComplianceSearch: parameters, why Items and Size are blank without -Identity, -Case, status and search actions."
status: published
---

**Quick answer:** Get-ComplianceSearch shows the compliance searches (content searches) in Microsoft Purview or Exchange Server 2016 and later. Run it with no parameters for a summary of every search, or name one search with `-Identity` to see its item count and size:

```powershell
Get-ComplianceSearch -Identity "Case 1234" | Format-List
```

Source: [Get-ComplianceSearch on Microsoft Learn](https://learn.microsoft.com/en-us/powershell/module/exchangepowershell/get-compliancesearch).

## Where does it run?

It runs in Exchange Server 2016, 2019 and Subscription Edition, and in Security & Compliance PowerShell in Microsoft 365. In the cloud, connect with `Connect-IPPSSession`, not `Connect-ExchangeOnline`:

```powershell
Connect-IPPSSession -UserPrincipalName admin@contoso.onmicrosoft.com
```

New to the module? See [how to install Exchange Online PowerShell](/blog/install-exchange-online-powershell-module/). On-premises, run it in the Exchange Management Shell.

Permissions:

- On-premises, the cmdlet is in the Mailbox Search role. By default, only the Discovery Management role group has that role.
- In Microsoft 365, you need [Microsoft Purview compliance portal permissions](https://learn.microsoft.com/en-us/purview/microsoft-365-compliance-center-permissions).

## Which parameters does it take?

| Parameter | Where | What it does |
| --- | --- | --- |
| `-Identity` | Both | The search to show, by name or JobRunId (a GUID). Leave it out to list every search. |
| `-Case` | Cloud only | Only searches in one eDiscovery Standard case. It doesn't show searches in eDiscovery Premium cases. |
| `-ResultSize` | Both | Maximum results. The default is 1000. Use `Unlimited` for all. |
| `-DomainController` | On-premises only | The domain controller to read from, such as `dc01.contoso.com`. |

## Examples

Every search, summary view:

```powershell
Get-ComplianceSearch
```

One search, every property:

```powershell
Get-ComplianceSearch -Identity "Case 1234" | Format-List
```

Name, JobRunId and status of every search, as a table:

```powershell
Get-ComplianceSearch | Format-Table -Auto Name,JobRunId,Status
```

The first two are Microsoft's examples from Learn. Microsoft gives the third as the way to find a search's name or JobRunId.

Searches in one eDiscovery Standard case:

```powershell
Get-ComplianceSearch -Case "Contoso Litigation"
```

## Why are Items and Size blank?

To keep the command fast, Microsoft leaves some properties out when you don't name a search. These only show up when you use `-Identity`:

- `Items`
- `Size`
- `SuccessResults`
- `NumBindings`
- `ExchangeLocation`
- `SharePointLocation`
- `OneDriveLocation`

```powershell
Get-ComplianceSearch -Identity "Case 1234" | Format-List Name,Status,Items,Size,ExchangeLocation
```

`NumBindings` isn't the number of users. Microsoft notes that it counts each primary mailbox, main archive and additional archive in the search, and each user can have any mix of those.

To get counts for every search at once, pass each name to `-Identity`:

```powershell
Get-ComplianceSearch -ResultSize Unlimited | ForEach-Object {
    Get-ComplianceSearch -Identity $_.Name
} | Select-Object Name,Status,Items,Size
```

## How do I run or rerun a search?

Get-ComplianceSearch only reads. To start a search that's stopped, completed or never started, use Start-ComplianceSearch:

```powershell
Start-ComplianceSearch -Identity "Case 1234"
```

In the cloud, Microsoft lists two requirements for Start-ComplianceSearch: version 3.9.0 or later of the Exchange Online PowerShell module (August 2025), and the `-EnableSearchOnlySession` switch on `Connect-IPPSSession`. Source: [Start-ComplianceSearch on Microsoft Learn](https://learn.microsoft.com/en-us/powershell/module/exchangepowershell/start-compliancesearch).

To create a search in the first place, see [New-ComplianceSearch](/blog/new-compliancesearch-powershell/).

## How do I see preview, export or purge actions?

Actions you add to a search with New-ComplianceSearchAction have their own cmdlet, Get-ComplianceSearchAction:

```powershell
Get-ComplianceSearchAction
Get-ComplianceSearchAction -Identity "Case 1234_Preview" | Format-List
```

The first line lists every action and the second shows one. Use `-Preview`, `-Export` or `-Purge` (one at a time, without `-Identity`) to list only actions of that type, and `-Details` for more detail. Source: [Get-ComplianceSearchAction on Microsoft Learn](https://learn.microsoft.com/en-us/powershell/module/exchangepowershell/get-compliancesearchaction).

## Troubleshooting

| Problem | Fix |
| --- | --- |
| "The term 'Get-ComplianceSearch' is not recognized" | In Microsoft 365, connect with `Connect-IPPSSession`, not `Connect-ExchangeOnline`. |
| `Items` and `Size` are blank | Add `-Identity` with the search name. |
| Every search came back when you asked for one | The `-Identity` value was `$null` or didn't match. Microsoft warns that this returns all objects. Check the value, especially in a loop. |
| A search in a case is missing | `-Case` covers eDiscovery Standard cases only, not eDiscovery Premium. |
| The list stops at 1000 | Add `-ResultSize Unlimited`. |
| Preview or export results aren't in the output | Those are search actions. Use Get-ComplianceSearchAction. |

## Summary

- Get-ComplianceSearch lists content searches in Microsoft Purview and Exchange Server 2016 and later.
- In Microsoft 365, connect with `Connect-IPPSSession` first.
- Name the search with `-Identity` to see `Items`, `Size` and the locations.
- Start-ComplianceSearch runs a search, and Get-ComplianceSearchAction shows its preview, export and purge actions.

Related: [New-ComplianceSearch](/blog/new-compliancesearch-powershell/), [Search-Mailbox](/blog/search-mailbox-powershell/), [Install Exchange Online PowerShell](/blog/install-exchange-online-powershell-module/).

Meeting Room 365 turns any iPad or Android tablet into a room display for Exchange and Microsoft 365 calendars. See the [features](/features/) or [pricing](/pricing/): $9 a display a month.
