Open Snake98bm opened 1 year ago
I should really separate these into different flags, such as "-ExcludeHiddenMailboxContacts" and "-ExcludeSharedMailboxContacts". I'll look into this and get back to you.
That would provably be best.
Hi! Has this been implemented yet? two separate flags?
when I suggest a fix in [https://github.com/grahamr975/EWS-Office365-Contact-Sync/issues/58], i didn't follow the code and later discovered that it only look at the HiddenFromAddressListsEnabled property, that had nothing to-do with shared mailboxes.
On the file GET-Gal-Contacts.ps1 line 64 I suggest following change.
DirectoryList = $(Get-EXOMailbox -ResultSize unlimited -PropertySets Minimum,AddressList | Where-Object {($_.HiddenFromAddressListsEnabled -Match "False") -and ($_.RecipientTypeDetails -notmatch "SharedMailbox")} )
This will keep backward compatibility, but also filter all shared-mailboxes.