Solved

Exchange 2010 delete message from multiple mailboxes

Posted on 2015-02-19
2
111 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
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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Doubt. 2 53
Exchange on iphone 16 40
will this script work on w2k3 server? 2 9
powershell command to get a dll version remotely for many server 12 0
Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …

932 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now