Get mailbox search reports using PowerShell
Description: The Get-MailboxSearch cmdlet retrieves all the mailbox searches (In-Place/eDiscovery searches) that are in progress, complete or stopped.
About mailbox search
In Exchange Online, the mailbox search feature is used to perform an In-Place or eDiscovery search. The Get-MailboxSearch cmdlet can be used to retrieve details of either type of mailbox search.
On the other hand, it is important to note that the results retrieved by Get-MailboxSearch are the mailbox searches created using the New-MailboxSearch cmdlet. However, from May 2020, Microsoft 365 will remove the support for New-MailboxSearch cmdlet, which renders the results of Get-MailboxSearch cmdlet useless. It cannot provide details on the latest mailbox searches.
Below are some scripts that use Get-MailboxSearch for your reference:
- [[-Identity] <SearchObjectIdParameter>]
- [-ResultSize <Unlimited>]
1 Get-MailboxSearch -ResultSize "unlimited"
This script retrieves a list of all mailbox searches.
1 Get-MailboxSearch "Project Pleasanton" | Format-List
This script retrieves all properties for the mailbox search Project Pleasanton.
1 (Get-Mailbox Mark).InPlaceHolds; Get-MailboxSearch -InPlaceHoldIdentity 9953d0f0fd03415e949d4b41c5a28cbb
This script retrieves the In-Place Holds that a user is placed on. The first command shows GUIDs of In-Place Holds. The last command retrieves a mailbox search based on the GUID of the In-Place Hold that the user is placed on.
Microsoft 365 mailbox search with M365 Manager Plus
With M365 Manager Plus you don't have to worry about the validity of the PowerShell cmdlets. The In-Place Hold & eDiscovery Activity report provides all the audit details of all the In-Place and eDiscovery searches done by admins in your Microsoft 365 setup.
Go to the Reports tab.
- Go to the Reports tab.
- Navigate to Other Services > Security Reports in the left pane.
- Under Admin Activities Reports, click on InPlace Hold & eDiscovery Activity.
Read more about security reports here.