Forum Discussion
Exchange Online to Remove In-Place Hold and eDiscovery Tool
C_the_S Microsoft has updated their note about retiring legacy eDiscovery tools and the Search-Mailbox cmdlet. Some guidance is now available for how to use PowerShell to move old Exchange Online in-place holds to holds in Office 365 eDiscovery cases. See the updated text at https://office365itpros.com/2020/01/08/posting-microsoft-365-roadmap-items-teams/ for more information.
Got to Step 5 and got "Only mailboxes are supported. The recipient name@contoso.com is of type MailContact" error and I can't proceed.
When I look at the values in $search.SourceMailboxes they are all mailboxes and the MailContact in the error response isn't there.
Looks like Microsoft still need to work on this.
- TonyRedmondJan 08, 2020MVP
C_the_S You expected the PowerShell to work without some massaging?
Try:
1. Create the policy:
$policy = New-CaseHoldPolicy -Name $search.Name -Case $case.Identity
2. Add the mailboxes from the old EXO search:
foreach ($mbx in $Search.SourceMailboxes) {
Set-CaseHoldPolicy -Identity $Policy.Name -AddExchangeLocation (Get-Mailbox -Identity $Mbx).PrimarySmtpAddress }3. Check that all the mailboxes are present:
get-caseholdpolicy -Identity $Policy.Name | Ft ExchangeLocation
I also found that the code didn't deal with inactive mailboxes too well.
BTW, the PowerShell cmdlets to deal with Office 365 eDiscovery cases is covered in Chapter 20 of the Office 365 for IT Pros eBook.
- C_the_SJan 08, 2020Bronze Contributor
Ok, thanks