Hi @berketjune2012 ,
According to this official document, it's not supported to use the wildcard as a prefix for the RecipientFilter parameter in Exchange Online Powershell, so it's not feasible to use recipient filter like (EmailAddresses -like '*@keyman .com') to directly create the customized address list.
As a workaround, we can set one of the custom attribute for the mailboxes who have PrimarySmtpAddress with specific domain such as @Company portal .com, for example:
Get-Mailbox | Where{$_.RecipientType -eq 'UserMailbox' -and $_.PrimarySmtpAddress -like "*contoso.com"} | Set-Mailbox -CustomAttribute10 "DomainContoso"
Then the custom address list can be created based on the conditional custom attribute:
New-AddressList -Name "DomainContoso AddressList" -IncludedRecipients AllRecipients -ConditionalCustomAttribute10 "DomainContoso"
To view the members of the address list, run the command below:
$AL = Get-AddressList -Identity "DomainContoso AddressList"; Get-Recipient -ResultSize unlimited -RecipientPreviewFilter $AL.RecipientFilter | select Name,PrimarySmtpAddress,HiddenFromAddressListsEnabled
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.