0
Multimedia department have one user twasul
use to send an email of advertisement with different subjects since 3 years till now, Exchange server storage fired up storage increasing.
How do I delete multiple messages from all employee mailboxes from all employee for specific sender twasul
?
I tried:
- Done:
New-ManagementRoleAssignment -Role "Mailbox Import Export" -User "administrator"
- Done:
New-ManagementRoleAssignment -Role "Mailbox Search" -User "administrator"
- Done:
Search-Mailbox -Identity 'twasul' -EstimateResultOnly
- I Am Confused:
Search-Mailbox -Identity "twasul" -TargetMailbox (????) -TargetFolder "\inbox" -LogOnly -LogLevel Full
- I feel like if I did this step it will clear
twasul
mailbox instead of all employee:Search-Mailbox -Identity "twasul" -DeleteContent
Although, I don't have a same (-SearchQuery 'Subject:"Your bank statement"'
) so what to do!
foreach ($mailbox in (get-mailbox)) {Search-Mailbox -id $mailbox -DeleteContent -Force}(not work !!)
I guess I have to put all employee on one group but this does not work:
`Search-Mailbox -identity "employee_group" -SearchQuery 'Received&;amp;amp;amp;lt;01/01/2018 .. 12/30/2018 ' -SearchDumpster:$false –deletecontent`
And this does not work either:
`Search-Mailbox -SearchQuery 'received="year" AND received>30/12/2018'`
This sounds confusing to me.... Can you explain what you are trying to do more clearly? Why would
twasul
be related to more than one mailbox of it's own? Thetwasul
is an account correct? Not a public folder, right? Does this account have permissions to everyone's MB or what? Are you just trying to find an email from this account in anyone's mailbox? – Pimp Juice IT – 2019-09-29T16:38:04.847You want to delete multiple messages from all mailboxes if this message exists in any of the mailboxes? Maybe that is what you are asking? – Pimp Juice IT – 2019-09-29T16:38:46.420
twasul is an email of a user his job to send broadcast message daily as an advertise with different subject. i wana delete the huge messages that sent it by twasul along an year ago also i can't query by subject because subject changed daily i need to figure out how to query by identity 'twasul' – osama ibnouf – 2019-09-29T17:40:16.793
So you want to find the "messages" in all your other email server account mailboxes (not
twasul
) to thetwasul
sent messages to with certain subject filters or whatever, right? If so, that makes more sense but the question needs [edit]ed to indicate, etc. – Pimp Juice IT – 2019-09-29T17:57:40.650right! how to fix it – osama ibnouf – 2019-09-29T18:22:49.307
Based on quick research without any testing, you want to try something like ....
Get-Mailbox | Search-Mailbox -SearchQuery ' ..... ' -DeleteContent
and be sure to look up the-searchquery
parameter and some examples of deleting between two dates and plug it in accordingly. – Pimp Juice IT – 2019-09-29T19:54:35.053This is not a bad question. There just seems to be a slight language issue. I have cleaned it up as best as I can. But for more information on formatting — which was the biggest issue here — please refer to this page: https://superuser.com/editing-help
– JakeGould – 2019-09-30T00:39:50.863dear brothers am not looking for the way to write an issue happened to me; on a time i will write better sure, now i am looking to solve an issue facing me ok ANY HELP! – osama ibnouf – 2019-09-30T10:32:08.637
1
@osamaibnouf I understand that it is frustrating to not get an answer, but it seems like Pimp Juice IT has provided some pointers. And my cleanup was intended to help you as well because — as posted — the original question is pretty much incomprehensible because it is a wall of text. I understand there might be a language issue, but please we do things like recommend reading up on formatting to help you get the answer you want.
– JakeGould – 2019-10-01T02:02:16.480