Solved

exchange 2010 search-mailbox command

Posted on 2013-01-14
8
1,183 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
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 500 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
This article runs through the process of deploying a single EXE application selectively to a group of user.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
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…

820 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