Open OfirGavish opened 3 years ago
Hello, @OfirGavish
You don't need to make any significant modifications to the script since the MailboxList parameter supports a list of emails. Unfortunately, Batch does not support PowerShell lists. So, you'll need to either launch the ContactSync script from another PowerShell script instead of Batch or hardcore your emails into the EWSContactSync.ps1 MailboxList parameter so it looks like my example below.
[Parameter(Mandatory=$False)] [String[]] $MailboxList = @(email1, email2, email3),
I see, I was trying to add something like this using Exchange online powershell connection:
$DLGroupMembers = Get-DistributionGroupMember -Identity ManagementGroup foreach ($Member in $DLGroupMembers) { Get-Mailbox -Identity $Member
and then use the right attribute of the member in the $mailbox variable.
Hi, I'm trying to use the script but instead of syncing the GAL to all users, I want to sync the GAL with specific Distribution lists \ Mail-enabled Security Groups. I'm trying to add the required commands to the script but I'm having difficulties.