deleting folders within mailboxes and deleting selected e-mails with powershell
HelloWithin Exchange 2007 Management Shell is it possible to delete folders within mailboxes and/or deleting selected e-mails ?How can I do that?Thx in advanceSchfashedre
November 19th, 2009 2:04pm

Hi,Use the export-mailbox cmdlet to delete selected emails by subject only, like exmerge could in 2003.Example:Get-Mailbox -IdentityOliver.Moazzezi | Export-Mailbox -SubjectKeywords Sent hot-headed email to CTO -StartDate 19/11/2009 -DeleteContentNote that you will have to have permissions on the mailbox, add yourself to selected or to all using the Add-Mailboxpermission. Example:Single:Get-Mailbox -IdentityRonaldMcDonald | Add-MailboxPermission -UserOliver.Moazzezi -AccessRights Fullaccess -InheritanceType allScoped to Exchange Server:Get-Mailbox -ServerMBX1 | Add-MailboxPermission -UserOliver.Moazzezi -AccessRights Fullaccess -InheritanceType allAll:Get-Mailbox | Add-MailboxPermission -UserOliver.Moazzezi -AccessRights Fullaccess -InheritanceType allOliverOliver Moazzezi | Exchange MVP, MCSA:M, MCTS:Exchange 2010, BA (Hons) Anim | http://www.exchange2007.com | http://www.exchange2010.com | http://www.cobweb.com |
Free Windows Admin Tool Kit Click here and download it now
November 19th, 2009 5:46pm

Hi,Agree with Oliver, you can delete the selected mails using EMS. But you maybe cannot delete folders within mailboxes.More details: How to Export Mailbox Datahttp://technet.microsoft.com/en-us/library/bb266964.aspx Export-Mailboxhttp://technet.microsoft.com/en-us/library/aa998579.aspx Frank Wang
November 20th, 2009 11:23am

Hi Frank and OliverThx for your replyI have already full access to these mail-boxes. I will try to do the work with your comments.Thx againSchfashedre
Free Windows Admin Tool Kit Click here and download it now
November 22nd, 2009 1:27pm

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

Other recent topics Other recent topics