Wednesday, October 3, 2012

List Litigation Hold Users and Size

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:
Get-MailboxFolderStatistics <user> -FolderScope RecoverableItems | Select Identity, FolderAndSubfolderSize

Hope this helps!

8 comments:

  1. Hello,

    I'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
    }
    }

    }

    ReplyDelete
    Replies
    1. Hi Sahin,

      If 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?

      Delete
  2. 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?

    ReplyDelete
    Replies
    1. What is the exact cmdlet you are using?

      Delete