• Status: Solved
  • Priority: High
  • Security: Public
  • Views: 74
  • Last Modified:

o365 deleted items folder has 1 million items. What is the correct powershell command to remove all?

o365 deleted items folder has 1 million items.   What is the correct powershell command to remove all?
Facts:
1. It is a shared mailbox
2.  It has a litigation hold enabled
3.   The purge folder is at 100gb and has over 2 million objects in it.
0
FOX
Asked:
FOX
3 Solutions
 
Jason CrawfordTransport NinjaCommented:
With litigation hold enabled nothing will be permanently deleted
0
 
FOXActive Directory/Exchange EngineerAuthor Commented:
I understand that as they will be in a Purged folder but how do I clean out this Deleted items folder
0
 
Jason CrawfordTransport NinjaCommented:
Control + A Shift + Delete
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
FOXActive Directory/Exchange EngineerAuthor Commented:
That has not been working. The deleted items reappear.   I have set a retention policy on it with a tag to delete all out of the deleted items folder after 2 days.    The items still remained.
0
 
Jason CrawfordTransport NinjaCommented:
I'm guessing your Recoverable Items folder is full.  What do you have the quota set to?  You may want to enable archive mailboxes:

https://support.office.com/en-us/article/Increase-the-Recoverable-Items-quota-for-mailboxes-on-hold-a8bdcbdd-9298-462f-b889-df26037a990c
0
 
aikimarkCommented:
I advise you to consult lawyer and get advice in writing before deleting anything.
0
 
Gopi RajuSystem AnalystCommented:
You can use the retention policies to delete the items from deleted items.

Try running the below command

Search-mailbox -identity <alias> -SearchDumpsterOnly -DeleteContent
0
 
FOXActive Directory/Exchange EngineerAuthor Commented:
All,
After consulting with other members on my team we found out that this mailbox was receiving system generated emails and the litigation hold was not necessary.  Once I disabled the litigation hold I was able to run the command Gopi listed which cleaned out over 2 million items in the purged folder.  I was then able to delete all items from the deleted items folder from a regular "Empty folder" via the gui in OWA for this mailbox.
0
 
FOXActive Directory/Exchange EngineerAuthor Commented:
I had to remove the litigation hold in order to clean out the purges folder which had over 2 million items which in turn let me clean out the deleted items folder
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now