grahamr975 / EWS-Office365-Contact-Sync

Uses Exchange Web Services to synchronize a Global Address List in Office 365 to a user's mailbox
MIT License
96 stars 21 forks source link

Command to delete, overwrite Contacts\FolderName #107

Open IE-MP opened 4 weeks ago

IE-MP commented 4 weeks ago

We've previously used a different script when using an on-prem Exchange install. Everything works great when running your script, but we've used the same folder name (thinking it would empty the existing one and copy the new contacts over), but it just created an additional folder with the same name.

We now have two folders, but need to delete the old one (otherwise users will have some duplicate contacts).

Is there perhaps a switch that would let us overwrite the existing one (so we don't get two folders) or a command we can use to first delete the old folder then sync with your script?

grahamr975 commented 3 weeks ago

What's the path to your old folder? The EWS Contact sync creates a folder within the Contacts parent folder if the specified one isn't already there.

IE-MP commented 3 weeks ago

It looks like this: image

I'm currently testing using sync_single_user.bat, it's specified as: -FolderName "Company Contacts" ^

IE-MP commented 1 week ago

Is there perhaps some additional information that is required from my side, do you know of a workaround?