Open AisaacOcean opened 9 months ago
@AisaacOcean If you have a list of your user's emails, you can manually pass those in a list to the -MailboxList parameter
Hi @AisaacOcean,
I tried passing a list to -MailboxList parameter, via this command (Get-Content -Path "file.txt") however is says vaule is empty. If i run Get-Content -Path "file.txt" alone, it works and it has worked in you script before, can you perhaps tell me how to correctly pass the list?
@AisaacOcean @grahamr975
I made a few changes to your powershell script that may be useful.
I had the same issue, couldn't figure out how to filter out shared mailboxes. After pouring through MS docs and your code, I found it will work if you make the following modification in Get-GALContacts.ps1:
Here is the modified script in a format that can be pasted:
$ContactList = Get-User -Filter "(RecipientTypeDetails -eq 'UserMailbox')" -ResultSize unlimited | Select-Object DisplayName,FirstName,LastName,Title,Office,WindowsEmailAddress,Phone
There are a bunch of filter parameters you can use. Here is a complete list from the Microsoft Documentation:
Make sure you include the -ExcludeSharedMailboxContacts in your batch script.
Hello, Would it be possible to apply the scripts only for the user mailboxes, we do not want to do it also in the shared mailboxes?