Easy way to delete all the emails from a users mail box - outlook 2010

Hi

We use exchange 2007 and outlook 2010
One of the user left our organisation  year ago and have started again now and there are 1000s of mails  on her mail box
Is there a easy way of deleting all the mails and start with a fresh mail box.

Thanks
lianne143Asked:
Who is Participating?
 
Will SzymkowskiSenior Solution ArchitectCommented:
Why not just delete the mailbox and create a new one?
Remove-mailbox -identity <alias> -confirm:$false

Open in new window


Or use Export-Mailbox cmdlet.
Get-Mailbox -identity user1 | Export-Mailbox -TargetMailbox "exportmailbox" -TargetFolder "user1" -deletecontent

Open in new window


Will.
0
 
Pete LongTechnical ConsultantCommented:
see here
0
 
lianne143Author Commented:
The mail box user name is JPH
Please post me the right Cmdlet  to delete mails from : Inbox, sent items , and Deleted items

Thanks
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
lianne143Author Commented:
I trield this command from the exchange management shell and I get this error, not sure if I am making a mistake.

[PS] C:\Windows\system32>Get-Mailbox -identity jph | Export-Mailbox -TargetMailb
ox "exportmailbox" -TargetFolder "jph" -deletecontent
The specified user "exportmailbox" could not be found.
At line:1 char:1
+ Get-Mailbox -identity jph | Export-Mailbox -TargetMailbox "exportmailbox"
-Targe ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
    + CategoryInfo          : NotSpecified: (:) [], ManagementObjectNotFoundEx
   ception
    + FullyQualifiedErrorId : 98333571

[PS] C:\Windows\system32>Get-Mailbox -identity jph | Export-Mailbox -TargetMailb
ox "exportmailbox" -TargetFolder "jph" -deletecontent
0
 
Satya PathakLead Technical ConsultantCommented:
if you want to remove user mailbox on the server follow the below KB

http://www.msexchange.org/articles-tutorials/exchange-server-2007/management-administration/Managing-mailboxes-Exchange-Server-2007-Part2.html

If you want to remove emails on user mailbox needs to be export the emails ..

http://msexchangeguru.com/2011/12/14/roommailbox/
0
 
lianne143Author Commented:
Hi Guys

I followed this link

http://www.experts-exchange.com/Software/Server_Software/Email_Servers/Exchange/Q_28311617.html

Please help me if I have made any mistake I went to the  Exchange 2007 Management Console, Right-click the mailbox user and select "Disable" . I went into the disconnected mailbox folder and cant see the disconnected user now.
But still I created a new mail box for this user and since after creating this mail box I can see some mails have come to this mail box. but emails sent by some staff are not getting through and it comes with the following message

Delivery has failed to these recipients or distribution lists:

JPH
The recipient's e-mail address was not found in the recipient's e-mail system. Microsoft Exchange will not try to redeliver this message for you. Please check the e-mail address and try resending this message, or provide the following diagnostic text to your system administrator.

So not sure what is happening , please suggest me how to resolve this. Also I sent an email to this user and it is 30 minutes ago and the mail had not popped on the users inbox.

Thanks
0
 
Will SzymkowskiSenior Solution ArchitectCommented:
Couple of things...

If you Disable a mailbox and it does not come up in Disconnected then you need to run the following command...
clean-mailboxdatabase -database <database name>

Open in new window


The Delivery Has Failed error message is due to the user not having the old x.500 address associated with this mailbox. Another reason could be due to the caching on the other users Outlook (autocomplete). Have the user try and remove the autocomplete entry and then select the user from the GAL directly should resolve this issue.

Will.
0
 
lianne143Author Commented:
The database name is "Staff" Is the below syntax correct

clean-mailboxdatabase -database <Staff>

Also when I send email to JPH from my OWA the mail is received on the JPH mail box.
But if I send it from outlook client the mail doesn't appear on JPH inbox. I cleared auto complete  and no cashing at the moment.
I don't get any NDR report, not sure where the mail goes.

thanks
0
 
Will SzymkowskiSenior Solution ArchitectCommented:
That is the correct Syntax for clean-mailboxdatabase. Typically I like to use servername\databasename.

If this works in OWA and not in Outlook then there is some sort of caching issue.

Will.
0
 
lianne143Author Commented:
Thanks Will
0
 
Will SzymkowskiSenior Solution ArchitectCommented:
Ok sounds good. Point me to your question and i will answer it.

Will.
0
 
lianne143Author Commented:
Hi Will

When I give the clean database command , how long will it take to clean.
During this process will the exchange be down.

Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.