Somebody asked last week about exporting contacts from Exchange via EWS to a CSV file and I realised I didn't have a basic sample for doing this. Contacts are one of the more richer exchange datatypes and can hold a lot of different information which you may or may not want to capture in a CSV export. In this sample script I'll show you how you can export data from the normal contact strongly typed properties like GivenName and Surname and the Indexed properties which are used to store the EmailAddresses, PhoneNumbers and Address details and also any extended properties like the Gender property which there are no strongly typed property for. As I mentioned Contacts have a lot of properties so this script doesn't export everything just a subsection to show how to export properties from each of the different subgroups I talked about. To add other properties to script eg like the JobTitle you need to make the following modifications Add the property to the Custom object ...
Pushing the Envelope in Messaging and Office 365 Development