You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write-LogMessage-API 'Standards'-tenant $Tenant-message "Successfully applied recipient limits to $($MailboxesToUpdate.Count) mailboxes"-sev Info
168
-
}
169
-
catch {
169
+
} catch {
170
170
$ErrorMessage=Get-CippException-Exception $_
171
171
Write-LogMessage-API 'Standards'-tenant $Tenant-message "Could not set recipient limits. $($ErrorMessage.NormalizedError)"-sev Error -LogData $ErrorMessage
172
172
}
173
-
}
174
-
else {
173
+
} else {
175
174
Write-LogMessage-API 'Standards'-tenant $Tenant-message "All mailboxes already have the correct recipient limit of $($Settings.RecipientLimit)"-sev Info
176
175
}
177
176
}
@@ -180,12 +179,11 @@ function Invoke-CIPPStandardMailboxRecipientLimits {
180
179
if ($Settings.alert-eq$true) {
181
180
if ($MailboxesToUpdate.Count-eq0-and$MailboxesWithPlanIssues.Count-eq0) {
182
181
Write-LogMessage-API 'Standards'-tenant $Tenant-message "All mailboxes have the correct recipient limit of $($Settings.RecipientLimit)"-sev Info
183
-
}
184
-
else {
182
+
} else {
185
183
# Create structured alert data
186
184
$AlertData=@{
187
-
RequestedLimit=$Settings.RecipientLimit
188
-
MailboxesToUpdate=@()
185
+
RequestedLimit=$Settings.RecipientLimit
186
+
MailboxesToUpdate=@()
189
187
MailboxesWithPlanIssues=@()
190
188
}
191
189
@@ -197,11 +195,11 @@ function Invoke-CIPPStandardMailboxRecipientLimits {
0 commit comments