Deleting a specific portion of a users mailbox

Hi everyone,

a client of mine is running a hybrid enviroment of O365. A user requested i delete his mailbox content from a specific date, lets say from 1.1.2018 up to 31.12.2018. I’ve tried googling the issue and have found this Redirecting but the search-mailbox cmdlet isnt working for me. I’ve tried doing it via get-mailbox with -searchquery but searchquery is also not responding. Any input on how to tackle the issue is very appreciated, I’d really like to avoid delegating myself the permissions to his mailbox and manually deleting them.

First step to find a fix is to diagnose problem, but “isn’t working” doesn’t help with that.
Do you get any error code, message or anything that could help see why it isn’t working?

Did you read how to use Search-Mailbox?

Search-Mailbox (ExchangePowerShell) | Microsoft Docs

You need to confirm your search query is actually in those emails, if not try change your query.

1 Like

Sorry i should have been more specific. It turned out that i did not read carefully at first, i’ve now added myself to Discover Management role group and have been able to run the command, altho now its been “running” for 10minutes. Ive set the search and deletion of all recieved emails in a 1 year time period and its "stuck on “Searching… a search of the source mailboxes is in progress”. Im not sure if this is normal behavious, i dont know how long of a process this is but it feels like it should have been done by now.

I entered following string into google:
Search-Mailbox slow

Following links may help to diagnose:

Shared Mailbox slow search issues O365 : sysadmin (reddit.com)

email - 3 Exchange Mailboxes with 50GB and growing. Searching/Indexing is slow. Options? - Server Fault

search-mailbox performance (microsoft.com)