Solved

Exchange 2010 delete message from multiple mailboxes

Posted on 2015-02-19
2
117 Views
Last Modified: 2015-02-20
I am running the following powershell command to delete an email from multiple mailboxes. I am being prompted to confirm deleting email from mailboxes. The first mailbox is not one that showed in the search I ran using the -loglevel switch. I am guessing this is a prompt to confirm "IF" the search is matched for this mailbox confirm the delete but would like confirmation prior to confirming for that one and all of the mailboxes after.

Get-Mailbox –Database “<database>” –ResultSize unlimited | Search-Mailbox -SearchQuery 'subject:"<subject>"' -TargetMailbox "<mailbox>" -TargetFolder "<folder>" -loglevel full -deletecontent

Thank you

Ron
0
Comment
Question by:agcsupport
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 18

Accepted Solution

by:
irweazelwallis earned 500 total points
ID: 40621263
if you use the switch -logonly then you can see what its gone through and deleted

for the delete content you will get a prompt for all mailboxes unless you put a -confirm:$false
0
 

Author Comment

by:agcsupport
ID: 40621729
Perfect and that worked - Thank you
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
In-place Upgrading Dirsync to Azure AD Connect
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question