locked
Mail Contact Query RRS feed

  • Question

  • I need to get rid of old mail contacts (Exchange 2007)  that are no longer being used we have alot of them that have been created over the years.  I know I can extract this information from AD but not sure of the syntax for the query and I would need to pull:

    How can I pull this information out of AD for the contacts only to provide createstamptime and modifystamptime in the results other than looking at them individually? 

    Monday, November 28, 2011 10:45 PM

Answers

  • Hi,

    Have you tried running >get-contact -organizationalUnit "test" | seelect DisplayName, primarySMTPaddress,createStampTime | export-csv "c:\exported-contacts.csv".

    I'm not 100% sure about the attributes of created Date and Modified Date but you can find that out via adsiedit to find the correct attribute name.

    • Marked as answer by Eiram Rulz Tuesday, November 29, 2011 1:38 PM
    Tuesday, November 29, 2011 2:22 AM

All replies

  • Hi,

    Have you tried running >get-contact -organizationalUnit "test" | seelect DisplayName, primarySMTPaddress,createStampTime | export-csv "c:\exported-contacts.csv".

    I'm not 100% sure about the attributes of created Date and Modified Date but you can find that out via adsiedit to find the correct attribute name.

    • Marked as answer by Eiram Rulz Tuesday, November 29, 2011 1:38 PM
    Tuesday, November 29, 2011 2:22 AM
  • Hi,

    Please refer this.. it may help you..

    http://www.simple-talk.com/sysadmin/exchange/goodbye-exchange-exmerge,-hello-export-mailbox/ 

    hope this helps!


    Thanks & Regards, Kottees
    Tuesday, November 29, 2011 9:49 AM
  • Thanks for the responses.

    The get-contact cmd was right on point.  I ran it as follows:

    get-contact -organizationalUnit "Mail Enabled Contacts" | select DisplayName, WhenCreated, WhenChanged >c:\temp\contact.csv

    Thanks Michael!


    • Edited by Eiram Rulz Tuesday, November 29, 2011 3:17 PM
    Tuesday, November 29, 2011 1:37 PM