Thanks for the suggestion, yes I am looking to utilise a PS script and have it Task run at regular intervals, but want to do that if at all this ask is not possible via any Office365 development tools like Power Apps, or Power Automate or Azure AD groups.....
Associate Retention Policy to mailboxes based on criteria
Hi All,
I am thinking to create a couple of retention Policy for Exchange Online mailboxes and to associate/implement them automatically onto mailboxes that matches a couple of criterias, like matching certain AD attricutes.
I was looking for which all ways we can execute this?
One approach I can think of is, create a script and then run the script regularly using Task Scheduler. But, I am looking more efficient options , like can we use Azure Groups/AD groups to achieve this? Or Powerapps can be used to create a flow and implement the policies on mailboxes.
I could see one option in Office365 is to create Adaptive Retention Polcies, but this will need an E5 license which we do not have in our infra currently. Kindly, suggest an approach here.
Many Thanks,
Niru
2 answers
Sort by: Newest
-
-
Limitless Technology 44,011 Reputation points
2022-02-23T11:18:22.917+00:00 Hello @Niranjan T Pattana Shetty
Yes, this is possible, at least with OUs in your organization, for example:
Get-Mailbox -OrganizationalUnit "Marketing" -ResultSize Unlimited | Set-Mailbox -RetentionPolicy "RetentionPolicy-Marketing"
For detailed syntax and parameter information, see
https://learn.microsoft.com/en-us/powershell/module/exchange/get-mailbox?view=exchange-ps
https://learn.microsoft.com/en-us/powershell/module/exchange/set-mailbox?view=exchange-psHope this helps with your query,
--
--If the reply is helpful, please Upvote and Accept as answer--