[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

exchange 2010 search-mailbox command

Posted on 2013-01-14
8
Medium Priority
?
1,201 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
ID: 38776987
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
ID: 38777070
so there is no way to fully purge from the target mailboxes?
0
 
LVL 52

Expert Comment

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

- Rancy
0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

 
LVL 40

Expert Comment

by:Subsun
ID: 38777873
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
 

Author Comment

by:siber1
ID: 38779107
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
ID: 38779125
thx Subsun. ill take a look at that
0
 
LVL 40

Accepted Solution

by:
Subsun earned 2000 total points
ID: 38779642
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
ID: 38779714
excellent. just tested and verfied this works exactly as i was looking for. many thanks!
0

Featured Post

Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

Question has a verified solution.

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

As much as Microsoft wants to kill off PST file support, just as they tried to do with public folders, there are still times when it is useful or downright necessary to export Exchange mailboxes to PST files. Thankfully, it is still possible to e…
Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
This video discusses moving either the default database or any database to a new volume.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Suggested Courses

834 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