I am trying to create an export of all litigation holds with their sources and other useful information. I have tried the following script and it works great for an individual hold. But when I try it without the Identity to get all holds it leaves several columns empty. Any ideas?
Works as expected:
Get-MailboxSearch"Legal Hold"|Select-ObjectName,@{n="SourceMailboxes";e={($_|select-ExpandPropertySourceMailboxes) -join','}},@{n="Sources";e={($_|select-ExpandPropertySources) -join','}},Description,PreviewResultsLink,ResultNumberEstimate,ResultSizeEstimate,ResultsLink,ResultNumber,ResultSize|Export-CSVd:\Exports\LegalHoldSearch.csv-notypeinformation
This does not give SourceMailbox and Sources data:
Get-MailboxSearch|Select-ObjectName,@{n="SourceMailboxes";e={($_|select-ExpandPropertySourceMailboxes) -join','}},@{n="Sources";e={($_|select-ExpandPropertySources) -join','}},Description,PreviewResultsLink,ResultNumberEstimate,ResultSizeEstimate,ResultsLink,ResultNumber,ResultSize|Export-CSVd:\Exports\LegalHoldSearch.csv-notypeinformation