From d057aad260dd0a7882b3171de2e96835391c04eb Mon Sep 17 00:00:00 2001 From: KelvinTegelaar Date: Mon, 20 Nov 2023 23:46:12 +0100 Subject: [PATCH] fixes removal bug --- Modules/CIPPCore/Public/Remove-CIPPMailboxPermissions.ps1 | 4 ++++ version_latest.txt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Modules/CIPPCore/Public/Remove-CIPPMailboxPermissions.ps1 b/Modules/CIPPCore/Public/Remove-CIPPMailboxPermissions.ps1 index b11a1bfbe7d9..c9e480445056 100644 --- a/Modules/CIPPCore/Public/Remove-CIPPMailboxPermissions.ps1 +++ b/Modules/CIPPCore/Public/Remove-CIPPMailboxPermissions.ps1 @@ -13,6 +13,10 @@ function Remove-CIPPMailboxPermissions { if ($userid -eq "AllUsers") { $Mailboxes = New-ExoRequest -tenantid $TenantFilter -cmdlet "get-mailbox" $Mailboxes | ForEach-Object -Parallel { + Import-Module ".\Modules\CIPPCore" + import-module ".\GraphHelper.psm1" + Import-Module ".\Modules\AzBobbyTables" + Write-Host "Removing permissions from mailbox $($_.UserPrincipalName)" Remove-CIPPMailboxPermissions -PermissionsLevel @("FullAccess", "SendAs", "SendOnBehalf") -userid $_.UserPrincipalName -AccessUser $using:AccessUser -TenantFilter $using:TenantFilter -APIName $using:APINAME -ExecutingUser $using:ExecutingUser } -ThrottleLimit 10 } diff --git a/version_latest.txt b/version_latest.txt index 28446a5ea556..f4fa8fcb995d 100644 --- a/version_latest.txt +++ b/version_latest.txt @@ -1 +1 @@ -4.6.0 \ No newline at end of file +4.6.1 \ No newline at end of file