From 4cfbfc1cb7604f0be6c520de6a6101f37d6e1ef5 Mon Sep 17 00:00:00 2001 From: techmaster3 <133902439+techmaster3@users.noreply.github.com> Date: Fri, 31 May 2024 12:10:20 -0400 Subject: [PATCH] Update Configure-Auditing.ps1 Error with depreciated Audit Operation Type: Write-ErrorMessage : |Microsoft.Exchange.Management.Tasks.RecipientTaskException|MessageBind audit operation type is deprecated. Use MailItemsAccessed audit operation type instead. Replaced MessageBind with MailItemsAccessed --- Exchange Online/Configure-Auditing.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Exchange Online/Configure-Auditing.ps1 b/Exchange Online/Configure-Auditing.ps1 index 7825eda..a94a4e2 100644 --- a/Exchange Online/Configure-Auditing.ps1 +++ b/Exchange Online/Configure-Auditing.ps1 @@ -44,7 +44,7 @@ if ($Answer -eq 'y' -or $Answer -eq 'yes') { Write-Host Write-Host -ForegroundColor $MessageColor "The new audit log age limit has been set for all mailboxes" ## Enable all mailbox auditing actions - Get-Mailbox -ResultSize Unlimited | Set-Mailbox -AuditAdmin @{Add="Copy","Create","FolderBind","HardDelete","MessageBind","Move","MoveToDeletedItems","SendAs","SendOnBehalf","SoftDelete","Update","UpdateFolderPermissions","UpdateInboxRules","UpdateCalendarDelegation"} + Get-Mailbox -ResultSize Unlimited | Set-Mailbox -AuditAdmin @{Add="Copy","Create","FolderBind","HardDelete","MailItemsAccessed","Move","MoveToDeletedItems","SendAs","SendOnBehalf","SoftDelete","Update","UpdateFolderPermissions","UpdateInboxRules","UpdateCalendarDelegation"} Get-Mailbox -ResultSize Unlimited | Set-Mailbox –AuditDelegate @{Add="Create","FolderBind","HardDelete","Move","MoveToDeletedItems","SendAs","SendOnBehalf","SoftDelete","Update","UpdateFolderPermissions","UpdateInboxRules"} Get-Mailbox -ResultSize Unlimited | Set-Mailbox –AuditOwner @{Add="Create","HardDelete","Move","Mailboxlogin","MoveToDeletedItems","SoftDelete","Update","UpdateFolderPermissions","UpdateInboxRules","UpdateCalendarDelegation"} Write-Host