SOLVED

Junk folder

Highlighted
Frequent Contributor

Hi experts

someuser@somedomain.com has sent an email with subject:xyz to 500 users on 20 May 2018. I want to move this email to JUNK FOLDER for all these users. i have usernames in csv file

How do i achive this.

1 Reply
Highlighted
Solution
Name myuser1@mydomain.com myuser2@mydomain.com $mailboxes = Import-Csv c:\users.csv foreach($mailbox in $mailboxes){ Search-Mailbox -Identity $mailbox.Name -SearchQuery 'From:"somespammer@somedomain.com" AND Subject:"spam" AND Received:"05/22/2018"' -DeleteContent -force }