CmdID / PowerShell / Cmdlets / New
New-UnifiedAuditLogRetentionPolicy
Use the New-UnifiedAuditLogRetentionPolicy cmdlet to create audit log retention policies in the Microsoft Defender portal or the Microsoft Purview compliance portal. Exchange PowerShell reference
From the Exchange PowerShell reference 9 parameters Its page in the reference
Parameters
-NameThe Name parameter specifies a unique name for the audit log retention policy.-PriorityThe Priority parameter specifies a priority value for the policy that determines the order of policy processing.-RetentionDurationThe RetentionDuration parameter specifies how long audit log records are kept.-Confirm, -cfThe Confirm switch specifies whether to show or hide the confirmation prompt.-DescriptionThe Description parameter specifies a description for the audit log retention policy.-OperationsThe Operations parameter specifies the audit log operations that are retained by the policy.-RecordTypesThe RecordTypes parameter specifies the audit logs of a specific record type that are retained by the policy.-UserIdsThe UserIds parameter specifies the audit logs that are retained by the policy based on the ID of the user who performed the action.-WhatIf, -wiThe WhatIf switch doesn't work in Security & Compliance PowerShell.