none
How to Get All contact details from exchange server RRS feed

  • Question

  • Hi,

      I am working on mail client application. I want to get the all contacts from the exchange server(i am using Exchange 2007). I tried but i am getting only few details like Display name and nick name etc. I am not getting the email address. Can you please help me how to get the email address of a contact.

    Friday, March 21, 2014 8:17 AM

All replies

  • Hi Naresh,

    Did you try this

    Get-Contact | sort-object LastName | %{ Get-MailContact $_.DistinguishedName | select Name,PrimarySMTPAddress }

    Please mark as helpful if you find my contribution useful or as an answer if it does answer your question.That will encourage me - and others - to take time out to help you.
    Regards,

    Sathish

    Friday, March 21, 2014 8:34 AM
  • Hi Naresh,

    I'll be making the assumption, that you are using the EWS Managed Api.

    When loading items in EWS, you only get a few default properties unless you define property sets for your query. This means, that you need to tell Exchange just what properties you want, otherwise it won't tell you.

    However, it is possible to load the properties afterwards, either by individually using the "load" method on the item (scales horribly if you are loading many items) or the corresponding bulk operation on the exchange service object (scales very well, but requires a bit more effort to implement).

    Cheers,
    Fred


    There's no place like 127.0.0.1

    Friday, March 21, 2014 9:20 AM