Solved

exchange 2010 search-mailbox command

Posted on 2013-01-14
8
1,175 Views
Last Modified: 2013-01-15
is there a way to use search mailbox to also purge the message from "deleted items"?

here is the syntax i have for targeting members of a specific DG:

Get-DistributiongroupMember myDGlist | Search-Mailbox -SearchQuery subject:"FW: Payroll alert" -DeleteContent

thx in advance.

S.
0
Comment
Question by:siber1
  • 4
  • 2
  • 2
8 Comments
 
LVL 52

Expert Comment

by:Manpreet SIngh Khatra
Comment Utility
Yes there is no such command that will only look at Deleted Items folder or XYZ folder .... simply entire mailbox for the Filter

Get-DistributiongroupMember myDGlist | Search-Mailbox -SearchQuery "subject:FW: Payroll alert" -DeleteContent

- Rancy
0
 

Author Comment

by:siber1
Comment Utility
so there is no way to fully purge from the target mailboxes?
0
 
LVL 52

Expert Comment

by:Manpreet SIngh Khatra
Comment Utility
Yes this will purge the data from the Mailboxes that you will run against

- Rancy
0
 
LVL 40

Expert Comment

by:Subsun
Comment Utility
As mentioned above Search-Mailbox will not do a folder lever search..

Other possible option is with EWS Managed API and Powershell, following articles are good references to start with..

Ref : http://www.mikepfeiffer.net/2011/04/powershell-script-cmdlets-for-managing-e-mail-items-using-the-exchange-web-services-managed-api/

http://www.eveningread.com/2011/05/exchange-item-level-manipulation-with.html


Else why not create retention policy  for deleted items folder? (Require Exchange Enterprise CAL)
Ref: http://technet.microsoft.com/en-us/library/bb123548(v=exchg.141).aspx
or create a GPO to enable purge deleted items on exit option for in outlook?
0
Wish Marketing would stop bothering you?

Is your marketing department constantly asking for new email signature updates? Are they requesting a different design for every department? Do they need yet another banner added? Don’t let it get you down! There is an easy way to manage all of these requests...

 

Author Comment

by:siber1
Comment Utility
Rancy, yes but this just moves the message to the deleted items folder does it not?

for example, in our case a highly sensitive message was accidentally sent to the wrong DG. I'm looking for a way to fully purge this from the mailboxes that received the message. so that there is not way they can read it. not just move the message to their deleted items folder.

thx
0
 

Author Comment

by:siber1
Comment Utility
thx Subsun. ill take a look at that
0
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
Comment Utility
for example, in our case a highly sensitive message was accidentally sent to the wrong DG. I'm looking for a way to fully purge this from the mailboxes that received the message. so that there is not way they can read it. not just move the message to their deleted items folder.

For this purpose definitely you can use Search-Mailbox..
Get-Mailbox -Filter {(memberofgroup -eq "CN=ALLUsers,OU=DL,DC=Domain,DC=com")} -ResultSize Unlimited | Search-Mailbox -SearchQuery "Subject:'highly sensitive message'" -TargetMailbox Adminmailbox -TargetFolder "highly sensitive-DeletedMessages" -LogLevel Full -DeleteContent

Open in new window

Or
Get-DistributiongroupMember myDGlist | Search-Mailbox -SearchQuery "Subject:'highly sensitive message'" -TargetMailbox Adminmailbox -TargetFolder "highly sensitive-DeletedMessages" -LogLevel Full -DeleteContent

Open in new window


Should work.. This will move the emails from users mailbox to Adminmailbox folder "highly sensitive-DeletedMessages".
0
 

Author Closing Comment

by:siber1
Comment Utility
excellent. just tested and verfied this works exactly as i was looking for. many thanks!
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
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.
In this video we show how to create a Distribution Group 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 Recipients >>…
This video discusses moving either the default database or any database to a new volume.

772 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

9 Experts available now in Live!

Get 1:1 Help Now