< Back

Get-LaMailboxLitigationHold

Sun Jan 19, 2020 6:26 pm

NAME Get-LaMailboxLitigationHold



SYNOPSIS

Reports on all mailboxes and whether or not they are on Litigation Hold.



Additionally, can report on all mailboxes that do not have litigation hold enabled.





SYNTAX

Get-LaMailboxLitigationHold [-list] <Object[]> [-LitigationHoldDisabledOnly] [<CommonParameters>]





DESCRIPTION

Reports on all mailboxes and whether or not they are on Litigation Hold.



Additionally, can report on all mailboxes that do not have litigation hold enabled.



Mailbox UPNs should be passed from the pipeline as demonstrated in the examples below.



Individual mailboxes, all mailboxes, all mailboxes in a department are all possibilities.



Also demonstrated in an example below is importing mailboxes (UPNs) from a CSV





PARAMETERS

-LitigationHoldDisabledOnly [<SwitchParameter>]

{{Reports on Mailboxes the have Litigation Hold Disabled}}



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-list <Object[]>

{{UPNs passed from the pipeline}}



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES









-------------------------- EXAMPLE 1 --------------------------



Get-Mailbox -ResultSize unlimited | Select UserPrincipalName | Get-LaMailboxLitigationHold | Out-GridView





-------------------------- EXAMPLE 2 --------------------------



Get-Mailbox -ResultSize unlimited | Select UserPrincipalName | Get-LaMailboxLitigationHold | Export-Csv

.\\litigationholds.csv -NoTypeInformation





-------------------------- EXAMPLE 3 --------------------------



Get-Mailbox -ResultSize unlimited | Select UserPrincipalName | Get-LaMailboxLitigationHold

-LitigationHoldDisabledOnly | Export-Csv .\\litigationholds.csv -NoTypeInformation



This example only reports on those that do NOT have Litigation Hold Enabled (notice the switch

-LitigationHoldDisabledOnly)

-------------------------- EXAMPLE 4 --------------------------



Import-Csv .\\upns.csv | Get-LaMailboxLitigationHold | Export-Csv .\\litholds.csv -NoTypeInformation





-------------------------- EXAMPLE 5 --------------------------



Get-MsolUser -All -Department 'Human Resources' | Select UserPrincipalName | Get-LaMailboxLitigationHold |

Export-Csv .\\HRlitigationholds.csv -NoTypeInformation





-------------------------- EXAMPLE 6 --------------------------



A CSV could look like this



UserPrincipalName

user01@contoso.com

user02@contoso.com







RELATED LINKS