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
Copy file name to clipboardExpand all lines: Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Mailbox Permissions/Push-GetCalendarPermissionsBatch.ps1
+67-20Lines changed: 67 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,10 @@ function Push-GetCalendarPermissionsBatch {
4
4
Process a batch of calendar permission queries
5
5
6
6
.DESCRIPTION
7
-
Queries calendar permissions for a batch of mailboxes
7
+
Queries calendar permissions for a batch of mailboxes.
8
+
Uses a folder name cache to avoid the expensive Get-MailboxFolderStatistics call
9
+
on subsequent runs. First run discovers and caches the locale-specific calendar
10
+
folder name; all future runs skip that call entirely (50% fewer Exchange requests).
8
11
9
12
.FUNCTIONALITY
10
13
Entrypoint
@@ -19,39 +22,83 @@ function Push-GetCalendarPermissionsBatch {
19
22
try {
20
23
Write-Information"Processing calendar permissions batch $BatchNumber of $TotalBatches for tenant $TenantFilter with $($Mailboxes.Count) mailboxes"
21
24
25
+
# Load cached calendar folder names for this tenant
0 commit comments