Forum Discussion

Jaap Hoetmer's avatar
Jaap Hoetmer
Copper Contributor
Jul 24, 2018

Exchange Online - Extract user's contacts with PS

Hi all,

 

I have spent a fair amount of time trying to find a Powershell script enabling me to extract the contacts of an O365 Exchange account to a local file. It has proven to be somewhat of a challenge.

 

I found this script https://gallery.technet.microsoft.com/office/How-to-export-a-mailboxs-2dd7247a, which upon first observation should be able to produce what I want, but the script doesn't work, it fails indicating an Autodiscover error.

 

C:\Scripts\EXOGetContacts.ps1 : The Autodiscover service returned an error.
Au caractère Ligne:1 : 1
+ .\EXOGetContacts.ps1
+ ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [EXOGetContacts.ps1], AutodiscoverRemoteException
    + FullyQualifiedErrorId : AutodiscoverRemoteException,EXOGetContacts.ps1

 

Does anyone have any suggestions, either for the above error, or for an alternative methode to extract contacts using Powershell?

 

Much appreciated, kind regards.

Resources