CmdID / PowerShell / Cmdlets / New
New-RetentionComplianceRule
Use the New-RetentionComplianceRule cmdlet to create new retention rules in the Microsoft Purview compliance portal. Exchange PowerShell reference
From the Exchange PowerShell reference 17 parameters Its page in the reference
Parameters
Show its 17 parameters
-NameThe Name parameter specifies a unique name for the retention rule.-ApplyComplianceTagThe ApplyComplianceTag parameter specifies the label that's applied to email messages or documents by the rule (which affects how long the content is retained).-PolicyThe Policy parameter specifies the policy to contain the rule.-PriorityCleanupThe PriorityCleanup switch specifies whether to create a rule associated with a Priority cleanup policy.-PublishComplianceTagThe PublishComplianceTag parameter specifies the label that's published for the rule, which makes the label visible to users in apps (for example, Outlook, SharePoint, and OneDrive).-CommentThe Comment parameter specifies an optional comment.-Confirm, -cfThe Confirm switch specifies whether to show or hide the confirmation prompt.-ContentContainsSensitiveInformationThe ContentContainsSensitiveInformation parameter specifies a condition for the rule that's based on a sensitive information type match in content.-ContentMatchQueryThe ContentMatchQuery parameter specifies a content search filter.-ExcludedItemClassesThe ExcludedItemClasses parameter specifies the types of messages to exclude from the rule.-ExpirationDateOptionThe ExpirationDateOption parameter specifies whether the expiration date is calculated from the content creation date or last modification date.-IRMRiskyUserProfiles-MachineLearningModelIDsThis parameter is reserved for internal Microsoft use.-RetentionComplianceActionThe RetentionComplianceAction parameter specifies the retention action for the rule.-RetentionDurationThe RetentionDuration parameter specifies the hold duration for the retention rule.-RetentionDurationDisplayHintThe RetentionDurationDisplayHint parameter specifies the units that are used to display the retention duration in the Microsoft Purview compliance portal.-WhatIf, -wiThe WhatIf switch doesn't work in Security & Compliance PowerShell.