Answered by:
Delete content from mailbox

Question
-
I deleted mailbox content with this powershell command on exchange 2010 sp1:
Search-mailbox –Identity <Mailbox> -SearchQuery "received:<02/15/2012" -DeleteContent
The result showing :
[PS] C:\Windows\system32>Search-mailbox -Identity Smith -SearchQuery "received:<02/15/2012" -DeleteContent
Confirm
Deleting content from mailboxes mona
[Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is "Y"): a
RunspaceId : 9b1d043c-5302-4e47-9a8a-20c78ff8ab5e
Identity :Domain/User/Smith
TargetMailbox :
TargetPSTFile :
Success : True
TargetFolder :
ResultItemsCount : 2081
ResultItemsSize : 212.7 MB (223,013,340 bytes)But when go to Smith outlook the messages were not deleted. Why this happened?
What needs to do some period mails delete from outlook?
Thanks!!!!
Thursday, August 2, 2012 3:29 AM
Answers
-
You can check the link below for the correct format
Search-Mailbox -Identity Smith -SearchQuery "Received:<$('02/15/2012')" -DeleteContent
- Marked as answer by emma.yoyo Friday, August 10, 2012 2:44 AM
Thursday, August 2, 2012 6:24 AM
All replies
-
You can check the link below for the correct format
Search-Mailbox -Identity Smith -SearchQuery "Received:<$('02/15/2012')" -DeleteContent
- Marked as answer by emma.yoyo Friday, August 10, 2012 2:44 AM
Thursday, August 2, 2012 6:24 AM -
[PS] C:\Windows\system32>Search-mailbox -Identity Smith -SearchQuery "received:<02/15/2012" -DeleteContent
Confirm
Deleting content from mailboxes mona
[Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is "Y"): a
RunspaceId : 9b1d043c-5302-4e47-9a8a-20c78ff8ab5e
Identity :Domain/User/Smith
Hi shrigiriraj,
Did you copy the output from EMS? I wonder the different maibox name.
Instead of deleting the content, you can also copy the search result to another mailbox(-TargetMailbox -TargetFolder) to check the result first.
Search-Mailbox
http://technet.microsoft.com/en-us/library/dd298173.aspx
Frank Wang
TechNet Community Support
Friday, August 3, 2012 6:48 AM -
-
I change the name of the user and domain name for my company policy.Monday, August 6, 2012 7:12 PM
-
-