locked
Retrieving contacts for all users RRS feed

  • Question

  •  

    Hello

     

    I've been searching the net for sometime now trying to find some sort of script that will retrive all contects for all users in my AD. I new in scripting so I hopede that some of you guys could me by telling what classes/connections etc. I could use for this purpose.

     

    Maybe I'm not looking the right places, but I can't find any objects that can return the wanted information.

    Monday, December 8, 2008 2:11 PM

Answers

  • Hi John,

    Are you talking about the contacts which are stored by users inside their mailboxes?


    Well those contacts are difficult to copy. You have below options…


    1. You may need to find some script/program to extract those. Something similar to below.
    http://gsexdev.blogspot.com/2004/09/copying-contacts-from-one-mailbox-to.html

    2. You may need to find some third party utility.


    3. You can use ExMerge or Export-Mailbox to export contact folder to PST file..


        -    If you have only Exchange 2003 server in your environment then you must use ExMerge to export contacts folder to PST files…

             Check below article, use “Copy data into target store” in step 7 so it doesn’t delete source folder
             http://www.msexchange.org/tutorials/MF013.html


        -    In coexistence mode (Exchange 2003 + Exchange 2007 servers) environment you can still use Export-Mailbox to export contacts folder.

             How to Export Mailbox Data 
             http://technet.microsoft.com/en-us/library/bb266964.aspx


    Amit Tank || MVP - Exchange || MCITP - Exchange 2007 || http://ExchangeShare.WordPress.com
    • Proposed as answer by Amit Tank Friday, December 12, 2008 9:11 PM
    • Marked as answer by Mike Shen Thursday, December 18, 2008 5:26 AM
    Thursday, December 11, 2008 3:44 PM

All replies

  • get-mailcontact -resultsize unlimited would do a dump of all contacts on your domain.  You can also pipe that to the select object to dump just specific attributes

     

    example

     

    get-mailcontact -resultsize unlimited | select <attribute1>,<attribute2>

     

    Tuesday, December 9, 2008 2:02 AM
  • For Exchange 2003, you can use Ldife tool to export the AD object:

    http://support.microsoft.com/kb/237677

     

    Mike

     

    Wednesday, December 10, 2008 3:25 AM
  • Aaron AA: Does this work with Exchange 2003? Can't seem to fint any shell that accept this command :(

    Mike Shen: This was more helpfull I exportet an ldf file with the ldifde -f command. When looking in the ldf file through notepad I can't find the contacts for each user. Is there anything I'm missing?
    Thursday, December 11, 2008 2:58 PM
  • Hi John,

    Are you talking about the contacts which are stored by users inside their mailboxes?


    Well those contacts are difficult to copy. You have below options…


    1. You may need to find some script/program to extract those. Something similar to below.
    http://gsexdev.blogspot.com/2004/09/copying-contacts-from-one-mailbox-to.html

    2. You may need to find some third party utility.


    3. You can use ExMerge or Export-Mailbox to export contact folder to PST file..


        -    If you have only Exchange 2003 server in your environment then you must use ExMerge to export contacts folder to PST files…

             Check below article, use “Copy data into target store” in step 7 so it doesn’t delete source folder
             http://www.msexchange.org/tutorials/MF013.html


        -    In coexistence mode (Exchange 2003 + Exchange 2007 servers) environment you can still use Export-Mailbox to export contacts folder.

             How to Export Mailbox Data 
             http://technet.microsoft.com/en-us/library/bb266964.aspx


    Amit Tank || MVP - Exchange || MCITP - Exchange 2007 || http://ExchangeShare.WordPress.com
    • Proposed as answer by Amit Tank Friday, December 12, 2008 9:11 PM
    • Marked as answer by Mike Shen Thursday, December 18, 2008 5:26 AM
    Thursday, December 11, 2008 3:44 PM