Dec 08 2018 09:28 AM
Dec 08 2018 09:28 AM
Have a problems with Office 365 / Outlook 2016 / Exchange Online Plan 1
I have a service mailbox which has 60000 emails in deleted items folder and I can't empty it - tried in Outlook and via OWA - they appear to go but if I refresh they come back
Also tried mfcmapi deleting "recoverable items" and "deleted items" as per http://m1econsulting.com/knowledge-base/clear-out-deleted-items-folder-with-mfcmapi-exchange-2010/ which doesn't work
Also tried deleting the whole Deleted Items folder as per mention here - https://social.technet.microsoft.com/Forums/ie/en-US/e65534c4-3b35-48ea-b54a-3412af600be3/cant-delet...
But that fails with error below:-
Code: MAPI_W_PARTIAL_COMPLETION == 0x00040680
Function lpParentFolder->DeleteFolder( lpItemEID->cb, reinterpret_cast<LPENTRYID>(lpItemEID->lpb), lpProgress ? reinterpret_cast<ULONG_PTR>(m_hWnd) : NULL, lpProgress, ulFlags)
Mailbox is now just under its 50gb limit and problem is getting urgent as this mailbox processes emails automatically so needs to be working
Any ideas please?
Dec 08 2018 12:54 PM
Dec 08 2018 01:42 PMSolution
Thanks for your reply and the suggested article which has certainly given me some useful notes for next time I have a problem
In the end as the mailbox is critical to our business (process incoming mail for a document management system), I logged a support call with Microsoft and a really helpful chap advised it was due to the 14 day retention policy on mailbox not working and used some powershell commands to get it working
So fingers crossed the 60000+ items in deleted items has now started to go down and 99% of my 50Gb used is now 85% so much improved
Thank you for your reply
Dec 08 2018 01:51 PM - edited Dec 08 2018 01:53 PM
Thanks Darren, thanks for confirming. Really glad it's working. In that case, if you could mark it as the solution and then drop us a line if the issue is unresolved, or you have an issue elsewhere and we'll look straight into it. Had a great rest of the weekend.
Oh, in order to prevent it happening again, you can always turn the archive on the mailbox which is another 50Gb and put a retention policy that everything older than, say, a year, will go into the archive or delete. It may be a way of keeping the mailbox clear for the future.
Dec 09 2018 07:57 AM
Why wasn't the retention policy working? Perhaps it was simply that the Managed Folder Assistant had skipped the mailbox for some reason (it uses a weekly workcycle) and the command used to get things going again was Start-ManagedFolderAssistant?
Dec 09 2018 08:03 AM
Unfortunately I don't know why it had stopped working, just know it must have done as inbox had four weeks of mail rather than the two weeks (14 days) it was supposed to contain and that was why it was hitting limit. Problem then got worse when I tried deleting loads of them manually, it wouldn't let me delete permanently so had to delete and put in deleted items, then I couldn't empty deleted items, so ended up over size limit and with bin not working/emptying
Using Start-ManageFolderAssistant then kicked it in to life (after purging RecoverableItems as well) and deleted folder went from 60000+ items (9gb+) to 0 items in about 6 hours
Dec 09 2018 08:07 AM
so does that mean a retention rule (the Managed Folder Assistant) only runs once a week normally? so even if doing 14 day retention, it may get to 20/21 days if only running once every 7 days normally?
Dec 09 2018 10:17 AM
The aim of the workcycle used by the MFA is to process mailboxes at least once at week. Often it happens more often. The exact details depend on server load. If you have a policy to remove items from the Deleted Items folder once they are 14 days old, they should be removed on that basis.
Dec 09 2018 10:20 AM
thanks for reply
Yes we have a 14 day deletions policy to delete all mail in inbox permanently if over 14 days old, so like this should avoid it going in deleted items.
Will keep monitoring mailbox now to make sure it works and doesn't creep up to 50gb again
Dec 10 2018 01:53 AM
I wrote some code to figure out how often MFA processes mailboxes on my tenant. It seems like they are being processed at least a couple of times per week. Try this on your tenant: https://office365itpros.com/2018/12/10/reporting-the-managed-folder-assistant/
Oct 20 2019 01:14 PM
Nov 20 2019 12:12 PM - edited Nov 20 2019 12:13 PM
I am experiencing also... no Powershell scripts are working. When we delete items, they show back up in seconds. Issue is our 100GB mailbox limit keeps getting maxed out and I cant delete anything to make space. No litigation holds.
Get-MailboxFolderStatistics "firstname.lastname@example.org" -FolderScope "RecoverableItems" | Format-List Name,FolderAndSubfolderSize
Name : Recoverable Items
FolderAndSubfolderSize : 110 GB (118,111,612,814 bytes)
Name : DiscoveryHolds
FolderAndSubfolderSize : 92.84 GB (99,683,338,775 bytes)
Get-MailboxFolderStatistics "email@example.com" -FolderScope "DeletedItems" | Format-List Name,FolderAndSubfolderSize
Name : Deleted Items
FolderAndSubfolderSize : 79.86 GB (85,753,721,801 bytes)
None of the above worked.
So this is very frustrating to say the least. MS ticket open but no fix at this time.
Jan 18 2020 09:16 PM
For me it turns out a previous admin had enabled the "Preservation Lock" option which means that anything not older than 5 years cannot be purged from the Recoverable Items folder.
Nov 08 2020 03:34 PM
@Darren Rose Years later, 4 separate support tickets, multiple "I understand the frustration you are feeling" phone calls with support, and this is still an issue. Nothing works. I am, to be honest, dumbfounded by the simplicity of this request and the inability of the Great Monopoly Microsoft to comply with a simple "select," and "delete" command that would enable the removal of the trash and recoverable data.
Nov 08 2020 03:43 PM
@jimbarrgpboston I completely agree, had the issue again recently and still such a pain, as you say it is not exactly a difficult request is it..
Nov 19 2020 11:17 AM
@Darren Rose and others, let me be of some assistance here. After a 10 day odyssey with Microsoft support there are specific reasons why deletion is not possible, especially as the mailbox gets to 100% full. It involves multiple steps to solve and will take some machine time to complete, but I will provide some Powershell steps to assist you. PLEASE NOTE, you will be permanently deleting items in the Deleted Items box in this process and they will NOT be recoverable! You can change things back to defaults after completion.
First, create a deleted items policy for the mailbox in question by going to EAC, Compliance Management, Retention Tags. Hit the + sign and "apply automatically to a default folder." Choose Deleted Items as the default folder, then click Permanently Delete, Retention Period should be Never.
Now, go to Retention Policies, and create a new policy, name it, and go to + sign for Retention Tags and add the one tag you just created and save the policy.
Next, go to the mailbox in question, click on Mailbox Features, and add change the Retention Policy to the new one you just created and save.
Now, open up Powershell and connect to Exchange Online (I use connect-ExchangeOnline command with modern authentication, as I've added these cmdlets to my Powershell environment, but you can still use the downloadable Exchange Powershell and connect-EXOPSession command if you like, they are both the same thing).
Force update to the retention policy by typing:
Start-ManagedFolderAssistant -Identity <email-address-of-affected-mailbox>
You may have to wait up to 24 hours, but things should delete that can be deleted, but you're not done yet.
Open EAC, and go to Permissions and add your account you log into Powershell with to the Discovery Management object under Admin Roles. You will have to wait about 10 minutes for this to take effect.
Open Powershell and connect to Exchange Online again, and send this command:
Get-ManagementRole -Cmdlet Search-Mailbox
This will add the "search-Mailbox" command and associated cmdlets to your shell for the next command to work:
search-mailbox -identity <email-address-of-affected-mailbox> -searchdumpsteronly -deletecontent
The above command will take sometimes hours to complete, and mail fail with a Store connect failure, but simply re-run it until it returns a cursor.
After that, you should be able to go to the Deleted Items folder on the affected mailbox using OWA and delete all mail. Don't forget to purge all deleted items after you so this so they are non-recoverable (this cannot be undone!). After all this, the "dumpster" command above can be re-run to make sure any add'l email is removed.
You may then check the dumpster size with this command:
Get-MailboxFolderStatistics -Identity <email-address-of-affected-mailbox> -Folderscope RecoverableItems | select name,foldersize,ItemsInFolder
When done, it is advisable you REMOVE yourself as a member from the Discovery Management object in EAC/Permissions/Admin Roles so you do not accidentally delete permanent objects.
Hope this helps. It was painful, but that got a mailbox from 100+% down below 10%.
Nov 19 2020 12:02 PM
@jimbarrgpboston - Excellent explanation - bookmarked for future reference - thanks