Create Address List in Exchange online based on Group Membership?

Darryl 51 Reputation points
2021-10-28T10:02:07.25+00:00

I would like to create some address lists which I know I have to do in Powershell.
How would I do this so the list is made up of users who are members of a particular group please and are only mailboxes, so no contacts etc.

Thank you.

Exchange | Exchange Server | Management
Windows for business | Windows Server | User experience | PowerShell
{count} votes

4 answers

Sort by: Most helpful
  1. Vasil Michev 119.5K Reputation points MVP Volunteer Moderator
    2021-10-28T12:26:32.127+00:00

    You can try something like this:

    New-AddressList -Name GroupBased -RecipientFilter {(MemberOfGroup -eq "CN=DG,OU=tenant.onmicrosoft.com,OU=Microsoft Exchange Hosted Organizations,DC=EURPR03A001,DC=prod,DC=outlook,DC=com") -and (RecipientType -eq "UserMailbox") -and (Alias -ne $null)}
    

    where you need to provide the DistinguishedName value for the group.

    2 people found this answer helpful.

  2. Darryl 51 Reputation points
    2021-10-28T12:28:18.627+00:00

    Thanks you Michev, will take a look at that.


  3. Darryl 51 Reputation points
    2021-10-29T07:40:24.127+00:00

    Just to say a big thank you to everyone that has helped me with this, I've got a few more AL to create but now know exactly how this is done thanks to the contributors on here.

    Have a great weekend.

    0 comments No comments

  4. Korbyn Forsman 5 Reputation points
    2024-05-23T17:36:39.1233333+00:00

    Seems helpful, but I'm finding that the only people showing up in the Address List are accounts that are modified after created the Address List.

    Still baffled as to why Update-AddressList didn't get added to Exchange Online...

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.