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
94 stars 21 forks source link

Sync contacts to the default folder name. #94

Closed AhmedMahmoud87 closed 8 months ago

AhmedMahmoud87 commented 9 months ago

is it possible to use the default contact folder instead of creating a new one ? I see the foldername parameter is mandatory.

grahamr975 commented 8 months ago

Yes. You'll need to modify line 42 of the Folders/New-EXCContactFolder.ps1 function. I don't plan on implementing this as a feature since it would overwrite/delete any of the user's existing contacts, which would be a bad user experience.

Old Get-EXCContactFolder -SmptAddress $MailboxName -FolderPath "Contacts\$FolderName" -Service $service | Out-Null New Get-EXCContactFolder -SmptAddress $MailboxName -FolderPath "Contacts" -Service $service | Out-Null