Wednesday, November 21, 2012

PowerShell Script to Search Distribution List Members Mailboxes

Here is a powershell script to search the mailboxes of a specified distribution list. I would run it from the Exchange Management Shell so you have access to all the Exchange cmdlets.



Link to Search-Malbox Cmdlet documentation
http://technet.microsoft.com/en-us/library/dd298173(v=exchg.141).aspx

Exchange Search keywords

Property Example Search results 
Attachmentsattachment:annualreport.pptxMessages that have an attachment named annualreport.pptx. The use of attachment:annualreport or attachment:annual* returns the same results as using the full name of the attachment.
Cccc:paul shenMessages with Paul Shen in the Cc field.
cc:pauls
cc:pauls@contoso.com
Fromfrom:bharat sunejaMessages sent by Bharat Suneja.
from:bsuneja
from:bsuneja@contoso.com
Keywords in retention policyretentionpolicy:business criticalMessages that have the Business Critical retention tag applied.
Date when messages expire according to policyexpires:4/1/2010Messages that expire on April 1, 2010.
Sentsent:yesterdayAll messages sent yesterday.
SubjectSubject:"patent filing"All messages where the phrase "patent filing" appears in the Subject field. 
Toto:"ben smith"Messages that have Ben Smith in the To field.
to:bsmith
to:besmith@contoso.com

AQS: http://technet.microsoft.com/en-us/library/bb232132.aspx#

No comments:

Post a Comment