How to get the dates of In-place Holds (eDiscovery Holds) applied to a list of mailboxes

Mani 376 Reputation points
2025-03-03T16:19:36.93+00:00

Hello All,

How to get the dates of In-place Holds (eDiscovery Holds) applied to a list of mailboxes using PowerShell

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,853 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Mars Shan-MSFT 235 Reputation points Microsoft External Staff
    2025-03-07T01:35:28.5766667+00:00

    Hello,

    Below are a few different ways you can retrieve the dates of in-place (eDiscovery) holds via PowerShell. In Exchange (both on‐premises and online) when you place a mailbox on hold, the mailbox object gets properties such as LitigationHoldEnabled and LitigationHoldDate populated. The LitigationHoldDate property records when the hold was applied.

    Below are sample approaches:

    ──────────────────────────────

    1. For All Mailboxes (Exchange Online or On‑Premises)

    To see all mailboxes that have a litigation hold along with the date it was enabled, you can run:

      Get-Mailbox -ResultSize Unlimited |

       Where-Object { $_.LitigationHoldEnabled -eq $true } |

       Select-Object DisplayName, UserPrincipalName, LitigationHoldDate |

       Format-Table –AutoSize

    This command does the following:

    •  Retrieves all mailboxes.

    •  Filters for mailboxes with LitigationHoldEnabled set to true.

    •  Selects the DisplayName (or you might choose another property such as UserPrincipalName) and LitigationHoldDate.

    •  Formats the output as a table.

    ──────────────────────────────

    1. For a Specific List of Mailboxes

    If you have a list of mailboxes (for example, stored in a CSV file that includes an “EmailAddress” or “UserPrincipalName” column), you can import the list and then query each mailbox. For example, if your CSV file is located at C:\MailboxList.csv and contains a header such as “EmailAddress”, use:

      $mailboxes = Import-Csv "C:\MailboxList.csv"

      foreach ($mb in $mailboxes) {

       Get-Mailbox -Identity $mb.EmailAddress |

        Select-Object DisplayName, UserPrincipalName, LitigationHoldDate |

        Format-Table –AutoSize

      }

    This script:

    •  Imports the CSV into the variable $mailboxes.

    •  Loops through each mailbox and queries its properties.

    •  Displays DisplayName, UserPrincipalName, and LitigationHoldDate.

    ──────────────────────────────

    1. Directly Query a Specific Mailbox

    If you only need to examine one mailbox, simply specify the identity:

      Get-Mailbox -Identity "user@example.com" | Select-Object DisplayName, LitigationHoldDate

    This outputs the display name and the date when the in-place hold was applied (if any).

    ──────────────────────────────

    Notes

    •  Ensure you have connected to your Exchange environment before running these commands. For Exchange Online, you might need to use the EXO V2 module (Connect-ExchangeOnline) or for on-premises use the Exchange Management Shell.

    •  The LitigationHoldDate property will be null if the mailbox is not on hold.

    •  The property names may differ for older versions of Exchange or if you’ve customized the setup. Always verify with Get-Mailbox | Get-Member if needed.


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.