Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4678
  • Last Modified:

Delete all outlook contacts in a mailbox - powershell command? Exchange 2007

I have an android user who's contacts got super-duplicated...he has multiple hundred copies of every contact, over 350,000 total. I am not able to manipulate the contacts at all in outlook, the client freezes and crashes when you try to do anything. I'm hoping somebody knows of a powershell command or some way to manipulate the mailbox on the server side, and delete all of his contacts?

I found reference to a powershell string:
search-mailbox -identity USERNAME -searchquery kind:contacts -deletecontent
but it errors out saying it doesn't recognize the cmdlet "search-mailbox" - might be part of exchange 2010 and not available in 2007?
0
ITHastings
Asked:
ITHastings
1 Solution
 
pclinuxguruCommented:
Well you can try this.

Login to the web access and delete it from there.

If outlook only crashes when you click on Contacts but still can view mail

Click Tool -> Address Book -> Dropdown and select address book

Wait till it load and select all and delete.
0
 
suriyaehnopCommented:
To delete contact from mailbox using Exchange Management Shell 2007.

Please follow this

http://technet.microsoft.com/en-us/library/bb266964(v=exchg.80).aspx
0
 
ITHastingsAuthor Commented:
In case anyone has the exact same problem and wants the specific command, I used this:

Export-Mailbox -Identity USERNAME -IncludeFolders '\Contacts' -DeleteContent
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now