Export recipients-contacts from office 365 to csv

Hi, I’m looking for some help with exporting contacts from Exchange admin center/recipients/contacts. These contacts are not related to any mailboxes, they are completely separated. Along with contacts I want to pull some information from contact/organization like Title and Department and export them to CSV. After puling information and modification on CSV I want to update them with PowerShell as well.

I will much appreciate some links and help.

 

So some of this will be easy, and some not so much. A lot depends on if you are in O365, or fully on-premise.

if O365 and your contacts are only in the cloud, you will be very limited in the data you can retrieve.

get-mailcontact is the command you’d want to use, but, some of the data you want to export isn’t available there.

 

if your contacts are in AD, something like the following should find them:

Get-ADObject -Filter {objectclass -eq ‘contact’}

 

If you search the site, you’ll come across the following topic…

https://powershell.org/forums/topic/get-active-directory-contact-information/