Skip to content

Commit 233eae4

Browse files
added days to lit hold
1 parent fcb0fa4 commit 233eae4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardEnableLitigationHold.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,19 @@ function Invoke-CIPPStandardEnableLitigationHold {
3939
} else {
4040
try {
4141
$Request = $MailboxesNoLitHold | ForEach-Object {
42-
@{
42+
$params = @{
4343
CmdletInput = @{
4444
CmdletName = 'Set-Mailbox'
4545
Parameters = @{ Identity = $_.UserPrincipalName; LitigationHoldEnabled = $true }
4646
}
4747
}
48+
if ($Settings.days -ne $null) {
49+
$params.CmdletInput.Parameters['LitigationHoldDuration'] = $Settings.days
50+
}
51+
$params
4852
}
4953

54+
5055
$BatchResults = New-ExoBulkRequest -tenantid $tenant -cmdletArray @($Request)
5156
$BatchResults | ForEach-Object {
5257
if ($_.error) {

0 commit comments

Comments
 (0)