Carl Billington
asked on
Remove all email messages from a specific mailbox via Powershell
Exchange 2010 SP2 RU6
Is there a powershell command that would remove all emails from a specific mailbox?
Thanks.
Is there a powershell command that would remove all emails from a specific mailbox?
Thanks.
one thing, you must be assigned the "Mailbox import Export" Role when running Search-Mailbox with parameter -DeleteContent:
http://technet.microsoft.com/en-us/library/ee633452.aspx
http://technet.microsoft.com/en-us/library/ee633452.aspx
Get-Mailbox -ResultSize Unlimited | Export-Mailbox -Senderkeywords "senderemail" –Deletecontent
Export-Mailbox "UserMailbox" -Senderkeywords "senderemail" -Deletecontent
Export-Mailbox "UserMailbox" -Senderkeywords "senderemail" -Deletecontent
ASKER
Correct, I need to run: New-ManagementRoleAssignme nt -Name "Import Export_Enterprise Support" -SecurityGroup "Organization Management" -Role "Mailbox Import Export"
I have done this but it still does not recognize: Search-Mailbox command.
Any ideaS?
I have done this but it still does not recognize: Search-Mailbox command.
Any ideaS?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window