Link to home
Start Free TrialLog in
Avatar of Anthony K O365
Anthony K O365Flag for United States of America

asked on

Exchange Server 2016 Remove selected Items from Deleted Items folder

 How can I use Search-Mailbox to find a specific item in the Deleted Items folder and remove it? (Perhaps searching against a csv or text file)
Avatar of J0rtIT
J0rtIT
Flag of Venezuela, Bolivarian Republic of image

What properties do you have from the deleted item?

Message-id? date? something specific?

Avatar of Anthony K O365

ASKER

Sent: <date>
From: <sender email>
Subject:

Would Export-Mailbox -Delete  also be useful? 
I would use this:

Search-Mailbox -Identity <mailbox to search from> -SearchQuery 'Subject:"The Subject" -LogLevel Full

Open in new window


or (1stI wanna know what will delete that's why the -WhatIf
Search-Mailbox -Identity <mailbox to search from> -SearchQuery 'Subject:"The Subject" -DeleteContent -WhatIf

Open in new window


then If I agree with the results to be removed I removed the WhatIf Parameter:

Search-Mailbox -Identity <mailbox to search from> -SearchQuery 'Subject:"The Subject" -DeleteContent

Open in new window


These will only delete items and placed them in the Deleted Items folder. I need to search the Deleted Items folder and delete those specific items  ( not purge ALL items from Deleted Items folder)
Any further thoughts?  thanks!!
ASKER CERTIFIED SOLUTION
Avatar of J0rtIT
J0rtIT
Flag of Venezuela, Bolivarian Republic of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
have you ever used the Would Export-Mailbox -Delete  command? 
yeah I've used it like 10 years ago in an exchange server 2010 long time ago.