We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fcb0fa4 commit 233eae4Copy full SHA for 233eae4
Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardEnableLitigationHold.ps1
@@ -39,14 +39,19 @@ function Invoke-CIPPStandardEnableLitigationHold {
39
} else {
40
try {
41
$Request = $MailboxesNoLitHold | ForEach-Object {
42
- @{
+ $params = @{
43
CmdletInput = @{
44
CmdletName = 'Set-Mailbox'
45
Parameters = @{ Identity = $_.UserPrincipalName; LitigationHoldEnabled = $true }
46
}
47
48
+ if ($Settings.days -ne $null) {
49
+ $params.CmdletInput.Parameters['LitigationHoldDuration'] = $Settings.days
50
+ }
51
+ $params
52
53
54
+
55
$BatchResults = New-ExoBulkRequest -tenantid $tenant -cmdletArray @($Request)
56
$BatchResults | ForEach-Object {
57
if ($_.error) {
0 commit comments