Delete all contacts in users mailbox Exchange 2010

I'm trying to delete all users contacts in Exchange 2010 using EMS and am encountering an error

Search-Mailbox –identity "Administrator" –SearchQuery "kind:contacts" –DeleteContent
A positional parameter cannot be found that accepts argument '-DeleteContent'.
    + CategoryInfo          : InvalidArgument: (:) [Search-Mailbox], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Search-Mailbox

Search-Mailbox –identity Administrator –SearchQuery "kind:contacts" -EstimateResultOnly
This runs fine and returns results

The first query doesn't even auto-complete for -DeleteContent

Any suggestions?
KThraceAsked:
Who is Participating?
 
KThraceAuthor Commented:
I ended up creating an outlook profile for each user and deleting the contacts through Outlook.
0
 
Seth_zinCommented:
http://www.experts-exchange.com/Software/Server_Software/Email_Servers/Q_27652901.html

Scroll to the bottom (Ignore the answer itll take you to page where you have to piece it all together yourself) the Author puts what command he used for that. It's for 2007 but it should work for 2010 too.
0
 
Seth_zinCommented:
Or I can just post it here, haha:

Export-Mailbox -Identity USERNAME -IncludeFolders '\Contacts' -DeleteContent
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
KThraceAuthor Commented:
I tried that already. Export-Mailbox has been replaced with New Mailbox Export Request.
0
 
Seth_zinCommented:
Ah ok, sorry I wasn't aware, Ill dig around some more.
0
 
Seth_zinCommented:
Sorry I wasn't able to help, I was going to see if I could use a exchange box to test it out but it would have took too long for your problem.
0
 
KThraceAuthor Commented:
Was not provided a solution. Used workaround.
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.