Powershell script to delete old mail items from exchange 2k3
Posted on 2010-08-17
I was hoping to get some help writing a powershell script that do the following:
1) Connect to exchange 2k3 (with latest SP installed).
2) Gain access to mailboxes (either individual or bulk mailboxes)
3) Look for mail items that are older than "x" amount of days
4) Once it finds mail items are that older than the specified date, go ahead and delete those mail items.
Exchange is running on win2k3 with latest SP. I'm also using PS 2.0 CPT 3. Not sure if this can be done with exchange 2k3, but it's worth the try for me as we are getting ready for a email migration and trying to remove Enterprise Vault archiving solution icons/shortcuts from users mailbox.
Please let me know if you have any questions, or if there's anything that isn't clear.
Thanks in advance.