Hi @Roger Roger ,
Welcome to the Microsoft Q&A platform!
Let me answer your questions one by one:
- Yes, you are on the right track in the Exchange Admin Center. You have correctly assigned the new retention policy to the user by navigating to Mailbox → Select user1@contoso.com → Mailbox → Retention Policies → Manage Mailbox Policies → Retention Policies and selecting Policy2.
- To verify that user1@contoso.com has Policy2 assigned, you can use the following PowerShell command:
Get-Mailbox -Identity user1@contoso.com | Select-Object Name,RetentionPolicy
This command will show the retention policy assigned to the specified mailbox.
To check which retention tag is applied to each folder in their mailbox, you can use:
Get-MailboxFolderStatistics -Identity user1@contoso.com | Select-Object FolderPath,FolderType,RetentionPolicyTag
This command will list all folders and their retention tags.
- To find out which mailboxes have Policy2 assigned, you can use the following PowerShell command:
Get-Mailbox -ResultSize Unlimited | Where-Object {$_.RetentionPolicy -eq "Policy2"} | Select-Object Name,RetentionPolicy
To export this list to a CSV file, you can extend the command as follows:
Get-Mailbox -ResultSize Unlimited | Where-Object {$_.RetentionPolicy -eq "Policy2"} | Select-Object Name,RetentionPolicy | Export-Csv -Path "C:\Policy2Mailboxes.csv" -NoTypeInformation
- If you do not want any retention policy applied to a mailbox, you can set the retention policy to None. Use the following PowerShell command:
Set-Mailbox -Identity user1@contoso.com -RetentionPolicy $null
To verify that no retention policy is applied, you can check using the following command:
Get-Mailbox -Identity user1@contoso.com | Select-Object Name,RetentionPolicy
This will confirm that the retention policy is set to None.
Please feel free to contact me for any updates. And if this helps, don't forget to mark it as an answer.
Best,
Jake Zhang