Retention Policy is deleting the notes

Rita Rita 65 Reputation points
2025-08-25T23:37:34.61+00:00

Hello

Please i need your help on this issue.

We are getting below error while creating the tags. Please advise.

User's image

Microsoft Security | Microsoft Purview
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Pratyush Vashistha 1,525 Reputation points Microsoft External Staff Moderator
    2025-08-26T02:04:39.2566667+00:00

    Hi Rita Rita, Thanks for posting your query on Microsoft QnA!

    The error you're seeing is related to Exchange Online PowerShell and the New-RetentionPolicyTag cmdlet. The issue is that the value "PermanentlyDisable" for the -RetentionAction parameter is not a valid option.

    Valid values for -RetentionAction include:

    • MoveToDeletedItems
    • MoveToFolder
    • DeleteAndAllowRecovery
    • PermanentlyDelete
    • MarkAsPastRetentionLimit
    • MoveToArchive

    "PermanentlyDisable" is not a recognized action — it may be a misunderstanding or typo.

    Could you please share more details in form of answers for the below questions?

    1. Are you trying to prevent any retention actions from being applied to certain items? (If so, you might need to use "MarkAsPastRetentionLimit" or handle it via mailbox-level settings.)

    Are you using a script or automation tool to generate these commands? If yes, where is the value "PermanentlyDisable" coming from?

    Do you have existing retention policies or tags in place that are working correctly? Can you share an example of a working command?

    Is this part of a larger compliance or data governance strategy? If so, what are the business requirements?

    1. Are you using Exchange Online or on-premises Exchange Server? (This affects available cmdlets and parameters.)
    2. Have you checked the official documentation for New-RetentionPolicyTag recently? (https://learn.microsoft.com/en-us/powershell/module/exchange/new-retentionpolicytag )

    Thanks

    Pratyush


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.