SOLVED

ENABLE LEGAL HOLD VIA POWERSHELL

Steel Contributor

HI,

 

we have 2000 users

1500 are mailbox legal hold enabled in

 

500 mailbox to be legal hold enabled

 

how to do this by powershell? target is the 500 users only without passing through the 1500 users?

 

Thanks

1 Reply
best response confirmed by Marvin Oco (Steel Contributor)
Solution

you can try below script

 

Get-Mailbox -ResultSize unlimited | Where-Object { $_.LitigationHoldEnabled -eq $False } | Set-Mailbox -LitigationHoldEnabled $true --LitigationHoldDuration 2555
1 best response

Accepted Solutions
best response confirmed by Marvin Oco (Steel Contributor)
Solution

you can try below script

 

Get-Mailbox -ResultSize unlimited | Where-Object { $_.LitigationHoldEnabled -eq $False } | Set-Mailbox -LitigationHoldEnabled $true --LitigationHoldDuration 2555

View solution in original post