CmdID / PowerShell / Cmdlets / New
New-RetentionCompliancePolicy
Use the New-RetentionCompliancePolicy cmdlet to create new retention policies and new retention label policies in the Microsoft Purview compliance portal. Exchange PowerShell reference
From the Exchange PowerShell reference 30 parameters Its page in the reference
Parameters
Show its 30 parameters
-NameThe Name parameter specifies the unique name of the retention policy.-AdaptiveScopeLocationThe AdaptiveScopeLocation parameter specifies the adaptive scope location to include in the policy.-ApplicationsThe Applications parameter specifies the target when Microsoft 365 Groups are included in the policy (the ModernGroups parameter is set).-CommentThe Comment parameter specifies an optional comment.-Confirm, -cfThe Confirm switch specifies whether to show or hide the confirmation prompt.-EnabledThe Enabled parameter specifies whether the policy is enabled or disabled.-ExchangeLocationThe ExchangeLocation parameter specifies the mailboxes to include in the policy.-ExchangeLocationExceptionThe ExchangeLocationException parameter specifies the mailboxes to exclude from the policy when you use the value All for the ExchangeLocation parameter.-ForceThe Force switch hides warning or confirmation messages.-IsSimulationThe IsSimulation switch specifies the policy is created in simulation mode.-ModernGroupLocationThe ModernGroupLocation parameter specifies the Microsoft 365 Groups to include in the policy.-ModernGroupLocationExceptionThe ModernGroupLocationException parameter specifies the Microsoft 365 Groups to exclude from the policy when you use the value All for the ModernGroupLocation parameter.-OneDriveLocationThe OneDriveLocation parameter specifies the OneDrive sites to include.-OneDriveLocationExceptionThis parameter specifies the OneDrive sites to exclude when you use the value All for the OneDriveLocation parameter.-PolicyRBACScopesThe PolicyRBACScopes parameter specifies the administrative units to assign to the policy.-PolicyTemplateInfoThis parameter is reserved for internal Microsoft use.-PriorityCleanupThe PriorityCleanup switch specifies whether to create a Priority cleanup policy.-PublicFolderLocationThe PublicFolderLocation parameter specifies that you want to include all public folders in the retention policy.-RestrictiveRetentionThe RestrictiveRetention parameter specifies whether Preservation Lock is enabled for the policy.-RetainCloudAttachmentThe RetainCloudAttachment parameter specifies that this is a cloud attachment policy.-SharePointLocationThe SharePointLocation parameter specifies the SharePoint sites to include.-SharePointLocationExceptionThis parameter specifies the SharePoint sites to exclude when you use the value All for the SharePointLocation parameter.-SkipPriorityCleanupConfirmation-SkypeLocationThe SkypeLocation parameter specifies the Skype for Business Online users to include in the policy.-SkypeLocationExceptionThis parameter is reserved for internal Microsoft use.-TeamsChannelLocationThe TeamsChannelLocation parameter specifies the Teams to include in the policy.-TeamsChannelLocationExceptionThe TeamsChannelLocationException parameter specifies the Teams to exclude when you use the value All for the TeamsChannelLocation parameter.-TeamsChatLocationThe TeamsChatLocation parameter specifies the Teams users to include in the policy.-TeamsChatLocationExceptionThe TeamsChatLocationException parameter specifies the Teams users to exclude when you use the value All for the TeamsChatLocation parameter.-WhatIf, -wiThe WhatIf switch doesn't work in Security & Compliance PowerShell.