+ Post New Thread
Results 1 to 8 of 8
Enterprise Software Thread, Remove message from all users mail boxes Exchange 2010 sp1 in Technical; hello been trying to remove a message from all of our students mailboxes which one of the darlins sent out. ...
  1. #1
    ful56_uk's Avatar
    Join Date
    Mar 2008
    Location
    Essex
    Posts
    554
    Thank Post
    105
    Thanked 23 Times in 21 Posts
    Rep Power
    17

    Remove message from all users mail boxes Exchange 2010 sp1

    hello

    been trying to remove a message from all of our students mailboxes which one of the darlins sent out. where on sp1 2010 exchange but I cant seem to get the code to work and my heads hurting now with Power shell. Trying to do it for the body of the email too.

    Get-MailboxDatabase -identity "Student Database" | Search-Mailbox -SearchQuery 'Subject:"ENTER TEXT HERE"' -DeleteContent

  2. #2

    Join Date
    Jul 2006
    Location
    London
    Posts
    1,241
    Thank Post
    110
    Thanked 242 Times in 193 Posts
    Blog Entries
    1
    Rep Power
    74

  3. #3

    sonofsanta's Avatar
    Join Date
    Dec 2009
    Location
    Lincolnshire, UK
    Posts
    4,829
    Thank Post
    840
    Thanked 1,399 Times in 962 Posts
    Blog Entries
    47
    Rep Power
    603
    Well I did this on 2007 but presumably the cmdlets will work the same in 2010.

    Learnt the Hard Way: How to Forcibly Remove Messages in Exchange - Blogs - EduGeek.net

    Code:
    get-mailbox -Database Student | Export-Mailbox -SubjectKeywords "SUBJECT QUERY HERE" -StartDate "DD/MM/YYYY" -DeleteContent
    That will ask for a target mailbox and folder so give it your own or an itsupport mailbox and it copies the content over; that way you can see who has read the message or not (if you can be bothered to dig through them all!)

    EDIT to say I'm guessing the name of your student database there, obviously. Replace the word "student" with whatever is appropriate.

  4. #4
    ful56_uk's Avatar
    Join Date
    Mar 2008
    Location
    Essex
    Posts
    554
    Thank Post
    105
    Thanked 23 Times in 21 Posts
    Rep Power
    17
    I get the error The term 'Export-Mailbox' is not recognized as the name of a cmdlet, I think they made changes in 2010 sp1.

  5. #5


    Join Date
    Feb 2007
    Location
    51.405546, -0.510212
    Posts
    8,709
    Thank Post
    220
    Thanked 2,615 Times in 1,926 Posts
    Rep Power
    777
    Do you have the Mailbox Import Export RBAC role assigned to the user account you using? If not, that could be why it isn't working.

    Code:
    New-ManagementRoleAssignment –Role "Mailbox Import Export" -User Administrator
    Last edited by Arthur; 13th March 2012 at 04:29 PM.

  6. #6

    Join Date
    Nov 2011
    Location
    Manchester
    Posts
    50
    Thank Post
    2
    Thanked 11 Times in 10 Posts
    Rep Power
    7
    The command is now New-ExportMailboxRequest, as well as ensuring you have the role above^

  7. #7


    Join Date
    Feb 2007
    Location
    51.405546, -0.510212
    Posts
    8,709
    Thank Post
    220
    Thanked 2,615 Times in 1,926 Posts
    Rep Power
    777
    Quote Originally Posted by Jonah View Post
    The command is now New-ExportMailboxRequest
    I thought New-MailboxExportRequest was just for exporting mailboxes to PSTs? Surely it's the Search-Mailbox cmdlet you need?

    Code:
    Search-Mailbox -Identity JaneDoe -SearchQuery "Subject:'free iPad'" -DoNotIncludeArchive -SearchDumpster:$false -DeleteContent -Force
    Code:
    Get-Mailbox -ResultSize Unlimited | Search-Mailbox -SearchQuery 'from:mrspammer@spam.com' -DeleteContent -Force

  8. #8

    Join Date
    Dec 2008
    Location
    Essex
    Posts
    2,137
    Thank Post
    1
    Thanked 326 Times in 316 Posts
    Rep Power
    77
    Search-Mailbox is the command that you now use not the export cmdlet.

    Search For and Delete Messages from Users' Mailboxes

SHARE:
+ Post New Thread

Similar Threads

  1. Bulk user creation with exchange 2010 mailbox
    By z_z_zebedeeee in forum Windows Server 2008
    Replies: 8
    Last Post: 18th July 2011, 03:24 PM
  2. Hide desktop icons from all users
    By Hightower in forum How do you do....it?
    Replies: 12
    Last Post: 29th March 2011, 09:10 AM
  3. Replies: 10
    Last Post: 20th August 2010, 09:36 AM
  4. Exchange 2010 SP1 Beta released
    By DrCheese in forum Windows Server 2008 R2
    Replies: 9
    Last Post: 8th June 2010, 07:35 PM
  5. delete same folder from all users home area
    By markcuk in forum How do you do....it?
    Replies: 27
    Last Post: 25th April 2007, 10:38 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •