A feature introduced in Exchange 2010 RTM and that is being used more and more it Litigation Hold. It is used during a lawsuit, investigation or similar events to preserve mailbox items from inadvertent or purposeful modification or deletion by the user (or someone with access to the mailbox) and from automated deletion by retention policies. Until the hold is removed, deleted items are not purged from the mailbox database and if a mailbox item is modified, a copy of the original item is also retained. These are returned in Discovery searches performed when the mailbox is on Litigation Hold. Any retention policies applicable to the mailbox don't need to be suspended. Because messages continue to be deleted as expected (except from the Recoverable Items\Purges folder!), users may not notice they're on Litigation Hold.
To check if there are any users in your organization currently enabled for Litigation Hold, simply run the following cmdlet:
Get-Mailbox -ResultSize Unlimited -Filter {LitigationHoldEnabled -eq $True}
If you want to check the Recoverable Items folder size for all mailboxes on Litigation Hold, i.e. how many data is being held by Litigation Hold, use the following cmdlet:
Get-Mailbox -ResultSize Unlimited -Filter {LitigationHoldEnabled -eq $True} | Get-MailboxFolderStatistics –FolderScope RecoverableItems | FT Identity, FolderAndSubfolderSize
Or if you simply want to check a single mailbox:
Hope this helps!
Get-MailboxFolderStatistics <user> -FolderScope RecoverableItems | Select Identity, FolderAndSubfolderSize
Hello,
ReplyDeleteI'm trying to create a script to check if a user in a list (text file) is on Litigation hold or not.
Below is my code, I'm missing something but not sure what, was wondering if you can help:
foreach ($alias in get-content C:\Windows\system32\scripts\testusers.txt)
{
Get-Mailbox -Identity $alias | fl LitigationHoldEnabled, Alias
{
if (LitigationHoldEnabled -eq $True)
{
Write-Host "$alias is on LitHold" -fore green
}
}
}
Hi Sahin,
DeleteIf you simply want to return the users on that list that are enabled for Litigation, you can use the following cmdlet:
cat testusers.txt | Get-Mailbox | ? {$_.LitigationHoldEnabled -eq $True}
Is this what you are looking for?
In the second example for the data sizes the results will not export to csv. Is there something different about that data I am missing?
ReplyDeleteWhat is the exact cmdlet you are using?
DeleteNice Blog Post !
ReplyDeleteThanks! :)
Deletehi,
ReplyDeleteneed cmdlet command for disable litigation hold at 50 user at a time in 0365
A "please" or "thank you" wouldn't hurt :)
DeleteWhat 50 users? 50 random users? 50 users from a CSV file, ...?
what field has the comments portion of litigation hold....
ReplyDelete"Many organizations require that users be informed when they're placed on hold. Additionally, when a mailbox is on hold, any retention policies applicable to the mailbox user don't need to be suspended. Because messages continue to be deleted as expected, users may not notice they're on hold. If your organization requires that users on hold be informed, you can add a notification message to the mailbox user's by populating the Retention Comment property and using the RetentionUrl property to link to a web page for more information. Outlook 2010 and later versions display the retention comment and URL in the backstage area, which is located on the Files ribbon. You can use the Set-Mailbox cmdlet to add these properties."
Delete