Solved

Exchange 2010 delete message from multiple mailboxes

Posted on 2015-02-19
2
107 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
Comment Utility
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
Comment Utility
Perfect and that worked - Thank you
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This article will help you understand what HashTables are and how to use them in PowerShell.
Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
In this video we show how to create an Address List in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Organization >> Ad…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…

762 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

7 Experts available now in Live!

Get 1:1 Help Now