To change the Retention policy for the deleted items from the default 30 days to lets say 90 days follow this guide
First connected with PowerShell to Exchange Online Service.
To change the default RetentionPolicyTag for all users run.
Set-RetentionPolicyTag -Identity “Deleted Items” -AgeLimitForRetention 90
To verify all retention policy that are applied to a specific mailbox , please take the following steps.
c. Disable the current RPT applied to the Deleted Item Folders, by running the following cmdlet using PowerShell.
Set-RetentionPolicyTag “Deleted Items” -RetentionEnabled $false
d. Create a new retention policy tag for the default folder “Deleted Items” by using the following command:
New-RetentionPolicyTag “Exec -Default” -Type All -RetentionEnabled $true -AgeLimitForRetention 90 -RetentionAction DeleteandAllowRecovery
This example creates a retention policy tag for the default folder Deleted Items. When the tag is applied to a mailbox, items in the Deleted Items folder are deleted after 90 day.
After that, create a new retention policy or set up a current policy to link to the newly created retention policy tag.
e. Use PowerShell to apply the retention policy to Deleted Items
Set-Mailbox ” Deleted Items” -RetentionPolicy Execs
The following command applies the retention policy named Execs to Deleted Items: