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?
- 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?
- Are you using Exchange Online or on-premises Exchange Server? (This affects available cmdlets and parameters.)
- Have you checked the official documentation for
New-RetentionPolicyTag
recently? (https://learn.microsoft.com/en-us/powershell/module/exchange/new-retentionpolicytag )
Thanks
Pratyush