kennysarmy Posted June 30, 2023 Posted June 30, 2023 Anyone any ideas how I can remove all emails in staff O365 mailboxes? I've not really been able to find anything online in terms of PowerShell scripts.... I don't particularly want to have to do it manually.
drewp Posted June 30, 2023 Posted June 30, 2023 If its just the Deleted Items folder, you could set up a Exchange (Legacy) MRM Retention Policy. In Microsoft Purview, look under Data lifecycle managment, then Exchange Legacy. You would need to create a MRM Retention tag that applies to the Deleted Items folder, how long to keep items for then the action after retention period. The MRM Rentention tag woud then need to be assigned to a MRM Retention policy. Then the staff mailboxes would then need to have the MRM policy assigned in the Exchange admin Center. You can bulk assign the MRM policies. 1
djm968 Posted June 30, 2023 Posted June 30, 2023 Have a look at this. https://learn.microsoft.com/en-us/microsoft-365/compliance/ediscovery-delete-items-in-the-recoverable-items-folder-of-mailboxes-on-hold?view=o365-worldwide
kennysarmy Posted July 4, 2023 Author Posted July 4, 2023 Have a look at this. https://learn.microsoft.com/en-us/microsoft-365/compliance/ediscovery-delete-items-in-the-recoverable-items-folder-of-mailboxes-on-hold?view=o365-worldwide That's about deleting from the Recoverable Items folder I'd like to remove everything in the Deleted Items
TRSJon Posted July 4, 2023 Posted July 4, 2023 I've no idea as to how to do what you are asking, but can I ask Why you are planning on doing it? Just wondered what the end goal was?
TechMonkey Posted July 4, 2023 Posted July 4, 2023 Not OP but I'm presuming to empty all deleted items from all mailboxes. If OP's place is anything like mine, staff use them as a holding folder and never remove anything from them. Had a PA delete 20,000 emails from their deleted items after we pointed it out. That isn't a mistype and that was just a clear out, not emptying the folder. In response to OP, you could use a retention policy, but we aware that the policy will only kick in from the number of days you implement the policy or when items are moved to that folder. As discussed here
kennysarmy Posted July 4, 2023 Author Posted July 4, 2023 I've no idea as to how to do what you are asking, but can I ask Why you are planning on doing it? Just wondered what the end goal was? SMT don't want staff holding on to data that is no longer relevant and sensitive. 1
kennysarmy Posted July 4, 2023 Author Posted July 4, 2023 SMT don't want staff holding on to data that is no longer relevant and sensitive. Full text was: Currently the school email system retains emails indefinitely this is not in line with GDPR. From 1st Sept 2023 our system will retain emails for 14 months, this will include in boxes, folders and deleted items. Action needed - Make sure any information you need to save from emails over 14 months old is stored in an alternative location. For a few areas of the school (particularly those that have long term contract arrangements) this time frame my not be suitable. Some areas of the school have already spoken to me about this but if you feel you may need a different time frame please do let me know.
drewp Posted July 4, 2023 Posted July 4, 2023 We use the legacy MRM policies to have seperate retention for the different default folders, eg inbox 12 months, deleted items 10 days. If there is a folder outside of the defaults (Inbox, Sent, Deleted etc) the legacy policies wont apply to them. The moden policies would apply to non-default folders, but it is a one rule for all items - https://learn.microsoft.com/en-us/microsoft-365/compliance/create-retention-policies?view=o365-worldwide&tabs=teams-retention
kennysarmy Posted October 10, 2023 Author Posted October 10, 2023 Now we've discovered that we cannot use retention policies as we only have Office A1 licence and you now need A3 to be compliant, I wondered what my options are to stop staff holding on to data longer than our GDPR policy allows? Is it possible to run powershell scripts that would delete emails older than a certain date from users mailboxes?
pete Posted October 10, 2023 Posted October 10, 2023 It is possible to do it with powershell (search-mailbox). Microsoft are very likely to rate-limit you though. How much of what A3 offers would be useful to your school? "In order to do X, it costs Y, but it also includes $list_of_useful_things, so it makes sense."
kennysarmy Posted October 10, 2023 Author Posted October 10, 2023 It is possible to do it with powershell (search-mailbox). Microsoft are very likely to rate-limit you though. How much of what A3 offers would be useful to your school? "In order to do X, it costs Y, but it also includes $list_of_useful_things, so it makes sense." I believe these are the benefits, but can't see us needing any of those (some we already get via Microsoft 365 Apps for Faculty/Student)
drewp Posted October 10, 2023 Posted October 10, 2023 Office 365 A1 licences here and I can access the Legacy MRM policies...
kennysarmy Posted October 12, 2023 Author Posted October 12, 2023 Office 365 A1 licences here and I can access the Legacy MRM policies... Yes, but you can't add or edit in the Microsoft 365 section. Or at least I couldn't until I assigned myself an A3 licence :/ 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now