Search-mailbox restricted to single sub-folder
I'd like to be able to restore items in a particular subfolder for a user. I can't see a way to use the search-mailbox to achieve this result. Hopefully someone can point me to what I'm missing. Is there a way to restrict search-mailbox to a particular subfolder? search-mailbox -identity "my user" -SearchQuery "kind:email AND from:user@user.com" -estimateresultonly works fine but his says the keyword is not supported search-mailbox -identity "my user" -searchquery "kind:email AND from:user@user.com AND folder:myfolder" returns "The property keyword isn't supported" Rob
September 27th, 2010 2:25pm

Exchange can use the following terms (below). I am not aware of a subfolder filter. Exchange Search keywords Property Example Search results Attachments attachment:annualreport.pptx Messages 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. Cc cc:paul shen cc:pauls cc:pauls@contoso.com Messages with Paul Shen in the Cc field. From from:bharat suneja from:bsuneja from:bsuneja@contoso.com Messages sent by Bharat Suneja. Keywords in retention policy retentionpolicy:business critical Messages that have the Business Critical retention tag applied. Date when messages expire according to policy expires:4/1/2010 Messages that expire on April 1, 2010. Sent sent:yesterday All messages sent yesterday. Subject Subject:"patent filing" All messages where the phrase "patent filing" appears in the Subject field. To to:"ben smith" to:bsmith to:besmith@contoso.com Messages that have Ben Smith in the To field. Mike Crowley Check out My Blog!
Free Windows Admin Tool Kit Click here and download it now
September 27th, 2010 7:29pm

Agree with Mike. If you just set the searchQuery to "folder:myfolder", the error appears as well: "The property keyword isn't supported". I think you have to search all items, then delete unnecessary contents manually. Frank Wang
September 28th, 2010 4:59am

This seems like it would be a simple enhancement into the cmdlet since the attribute exists on the mail item object. It would be my vote to make this enhancement since it make single-item restores almost worthless if a folder is accidentally deleted. Plus, most mailboxes are getting quite large so adding search enhancements for restore would be a significant boost. Rob
Free Windows Admin Tool Kit Click here and download it now
September 30th, 2010 11:09pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics