Forum Discussion

tcboeira's avatar
tcboeira
Brass Contributor
Feb 10, 2023
Solved

Difficulties in creating Personalized Address Lists

Hi Good Morning Friends,

1) First of all, as always, I apologize if the words seem strange. I don't speak English and I use an online translator


2) Well, having said that, I have a doubt that after a few consultations I can't leave the place.


3) Briefly: I work with the big Tenet, with multiple domains. Although Tenet can be considered a large company and these domains are "its departments", these domains themselves are independent organizations that can even communicate with each other.


4) When you want to send a message to multiple recipients, querying the GAL, whether due to display limitations or an endless and non-assertive query, becomes a real inconvenience to the end user.


5) What's my best way?: Create custom Address Books (Address Book), where each List contains users from your own domain. That, in addition to the GAL itself, of course.


6) With that, I basically thought of:
- Create an Address Book
New-AddressList -Name 'DOMAIN1'
New-AddressList -Name 'DOMAIN2'

- Add the conditions and filters for each one:
Set-AddressList -Identity "DOMAIN1" -RecipientFilter "(RecipientType -eq 'UserMailbox')"
Set-AddressList -Identity "DOMAIN1" -RecipientFilter "(UserPrincipalName -like '*@domain1.com')"

 

Set-AddressList -Identity "DOMAIN2" -RecipientFilter "(RecipientType -eq 'UserMailbox')"
Set-AddressList -Identity "DOMAIN2" -RecipientFilter "(UserPrincipalName -like '*@domain1.com')"


... Although I would like to increment these lists from the CompanyName field of each user, existing in Azure AD ....


7) Well. the Address List appears normally, about a few minutes after I run the command for it to be created, but I really have difficulties in the part that deals with the user of each domain.


😎 Could someone explain to me what could be happening? Better... Where am I going wrong, either in the execution OR in the conception of the idea?!


Many, many thanks for your attention and patience in helping with this issue!

 

  • Well if you've cleared the value of CustomAttribute11, those mailboxes will definitely not appear in the newly created AL. If you are using the recipient filter shown above, set the value of CustomAttribute11 for few mailboxes, give it few minutes and check the AL membership (preferably in OWA). The "touch" part needs to be done once the AL is created, and you can use any attribute, such as changing the CustomAttribute11 from $null to something in this scenario.

5 Replies

    • tcboeira's avatar
      tcboeira
      Brass Contributor
      Hello, I hope everyone is well...
      Thank you very much Vasil Michev for his return...

      If I may, let me ask if the logic for this outline is correct:

      I adjusted the "CustomAttribute11" field of the domain accounts as desired (in this case I did it with two accounts of each):
      Set-Mailbox email address removed for privacy reasons -CustomAttribute11 "DOMAIN1"
      Set-Mailbox email address removed for privacy reasons -CustomAttribute11 "DOMAIN2"

      That done, I created the lists:
      New-AddressList -Name 'DOMAIN1'
      New-AddressList -Name 'DOMAIN2'

      Finally, I adjusted the list as follows:
      Set-AddressList -Identity "DOMAIN1" -ConditionalCustomAttribute11 "DOMAIN1" -IncludedRecipients MailboxUsers

      Set-AddressList -Identity "DOMAIN2" -ConditionalCustomAttribute11 "DOMAIN2" -IncludedRecipients MailboxUsers

      I remove/clean the CustomAttribute11 attribute field (which is what I chose to use)
      Set-Mailbox email address removed for privacy reasons -CustomAttribute11 $null
      Set-Mailbox email address removed for privacy reasons -CustomAttribute11 $null

      Is this the same idea? The "playback" time in the Exchange environment which is "tense" since we don't know if something is happening or not hehehe

      Finally, now rereading, I found myself thinking that: When before I applied the "Set-AddressList" command twice where once I used "-RecipientFilter "(RecipientType -eq 'UserMailbox')"" and on the other "-RecipientFilter "(UserPrincipalName -like '*@domain1.com')"" I didn't actually add the two together. One overwrote the other.

      I applied it here, as I mentioned above... I'm waiting to see "what happens".

      Well, thank you very much for your feedback, for your help. Not only does it help me to better understand these applications, which are all new to me, but it makes me want to learn and do more and more.

      Thank you very much, I look forward to your return and Hugs to all!!!
      • tcboeira's avatar
        tcboeira
        Brass Contributor
        Hello again...

        After two hours it didn't have the desired effect...

        When querying the return is the following:

        Get-AddressList 'DOMAIN1'

        Name DisplayName RecipientFilter
        ---- ----------- ---------------
        DOMAIN1 DOMAIN1 ((CustomAttribute11 -eq 'DOMAIN1') -and (RecipientType -eq 'UserMailbox'))

        Where could I be going wrong?!

Resources