Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Exchange / How to Create and Manage Distribution Groups (Lists) in Exchange?

March 11, 2021 ExchangePowerShell

How to Create and Manage Distribution Groups (Lists) in Exchange?

Distribution groups (lists) are a special type of recipients in Exchange. A distribution group has an email address but doesn’t have a mailbox. Emails sent to the distribution list are forwarded to the email addresses of all group members (DL recipients). Distribution groups may be used when you want to send an email to multiple recipients without having to enter each email address separately.

In this article, we’ll look at how to create and manage distribution groups in Exchange (the article is relevant for all supported Exchange versions, including Exchange Online, with some modifications). You can use Exchange Admin Center (EAC) or PowerShell console (Exchange Management Shell) to manage distribution groups.

There are three types of distribution groups in Exchange:

  • Mail-enabled universal distribution groups are used only for the distribution of emails. In common distribution groups (not the security ones), you may allow users to join or exit groups themselves (without membership approval);
  • Mail-enabled universal security groups are used both to send emails and to allow access to resources in the Active Directory domain.
    Tip. Common security groups in AD are populated manually. There is an article on website that tells how to create dynamic user groups in Active Directory using a PowerShell script.
  • Dynamic Distribution Group — members (recipients) are added to such a group automatically based on an LDAP filter.

Static Distribution Groups in Exchange

You can create a distribution list in the Exchange Admin Center (EAC).

  1. Open the EAC console and go to Recipients -> Groups;
  2. Click + and select the Distribution Group; how to create new distribution list on exchange (on-prem or online)
  3. Fill in the basic attributes of the distribution group:
    • Display name is the group name displayed in the address book
    • Alias is the group email address (must be less than 64 characters)
    • Notes – description of the group
    • Organizational unit is an Organizational Unit (OU) a distribution group is created in
    • Owners are the group owners (by default, a person who created a group becomes its owner)
    • Members – allows to add group members (recipients)
    • Choose whether owner approval is required to join the group shows if an owner approval is needed to join a group (the default value is Open: Anyone can join this group without being approved by the group owners, but you can change it to Closed: Members can be added only by the group owners)
    • Choose whether the group is open to leave shows if you need an owner approval to leave the group Create a distribution group (list) using Exchange Admin Center

You can also manage distribution groups from PowerShell (Exchange Management Shell). Let’s learn useful PowerShell commands to manage Exchange distribution lists.

To create a new Exchange distribution group:

New-DistributionGroup -Name “HelpDesk” -SamAccountName “HelpDesk” -OrganizationalUnit “woshub.com/de/munich/groups” -DisplayName "HelpDesk team" -Alias helpdesk

To create an open distribution list:

New-DistributionGroup -Name "ITNews "-Alias itnews –Type Distribution -MemberJoinRestriction open

You can assign mail attributes to universal AD groups only. To change the AD group type from local/domain to universal one, the EMS cmdlet is used:

Set-Group -Identity "WintelTeam" -Universal

or the Set-ADGroup cmdlet from the AD for PowerShell module:

Get-AdGroup "WintelTeam" | Set-ADGroup -GroupScope Universal

By default, you can send emails to an Exchange distribution group only from user email addresses inside your company (to reduce the number of spam mailings). To allow a distribution list to receive external emails, use the following command:

Get-DistributionGroup -identity “HelpDesk”| Set-DistributionGroup -RequireSenderAuthenticationEnabled $False

To disable the email address policy and change the SMTP address of the group:

Set-DistributionGroup -Identity “HelpDesk” -EmailAddressPolicyEnabled $false
Set-DistributionGroup -Identity “HelpDesk” -PrimarySmtpAddress support@woshub.com

You can add extra SMTP email addresses to the distribution group:

Set-DistributionGroup HelpDesk -EmailAddresses SMTP:support@de.woshub.com,SMTP:itsupport@woshub.com

To add a new user address to the distribution group:

Add-DistributionGroupMember -Identity HelpDesk -Member o.brian

To add a list of users to the distribution group from a text file (each new user full name or email address is specified in a new line in the file):

Get-Content C:\ps\new_helpdesk_dl_users.txt | Add-DistributionGroupMember -Identity HelpDesk

If you want to grant users permission to send on behalf of a distribution group, use the following command:

Set-DistributionGroup HelpDesk -GrantSendOnBehalfTo o.brian, t.muller

To display the list of the distribution group members:

Get-DistributionGroupMember –identity HelpDesk

Or you can export the email addresses of the group members to a CSV file:

Get-DistributionGroupMember –identity HelpDesk | ft name, primarysmtpaddress | Export-CSV c:\PS\HelpDesk_dl_members.csv

To remove a user from the distribution list:

Remove-DistributionGroupMember -identity HelpDesk –member t.muller -confirm:$false

To set the maximum message size that may be sent to the distribution group:

Get-DistributionGroup HelpDesk | Set-DistributionGroup -MaxReceiveSize 3MB

Dynamic Distribution Groups in Exchange

The list of members in Exchange dynamic distribution groups is updated automatically based on the criteria (filters) set. Actually, the filters are LDAP queries. Dynamic distribution groups may be created based on different user attributes in Active Directory. For example, the location, department name, job title, etc. Exchange regularly checks and updates the membership of a dynamic distribution group based on information in Active Directory.

You can create a dynamic distribution group using a simple form in the Exchange Admin Center. However, I prefer using PowerShell to do it.

Create and Manage dynamic distribution groups using Exchange Admin Center and PowerShell

Create a simple Exchange dynamic distribution group:
New-DynamicDistributionGroup -Name 'IT department' -RecipientContainer 'woshub.com/it/user' -IncludedRecipients 'AllRecipients' -ConditionalDepartment 'IT department' -OrganizationalUnit 'woshub.com/it/groups/exchange' -Alias itdept

  • RecipientContainer is a container in AD to get recipients from
  • IncludedRecipients is the type of recipients
  • ConditionalDepartment filter recipients by the value of the Company attribute of the AD user.

You can create a dynamic group using an LDAP filter in the RecipientFilter attribute as follows:

New-DynamicDistributionGroup -Name RomeSales -RecipientFilter {RecipientType -eq 'UserMailbox' -and Department -like '*sale*' –and CustomAttribute12 -eq 'IT' –and City -eq 'Rome' -and (Title -like '*head*' -or Title -like '*manager*' -or Title -like '*leader*')} -OrganizationalUnit Users

You can view the list of group members in EAC or using PowerShell:

Get-Recipient -RecipientPreviewFilter (Get-DynamicDistributionGroup -Identity 'RomeSales').RecipientFilter | ft name, primarysmtpaddress

To assign moderators of a dynamic distribution list:

Set-DynamicDistributionGroup HelpDesk -ModeratedBy o.brian, t.muller

To allow sending emails to the distribution group without moderation for the specific users:

Set-DynamicDistributionGroup -Identity RomeSales -BypassModerationFromSendersOrMembers t.muller

To enable delivery of external emails (from outside of the Exchange organization) to a dynamic distribution list, use the command:

Get-DynamicDistributionGroup -identity “HelpDesk”| Set-DynamicDistributionGroup -RequireSenderAuthenticationEnabled $False

1 comment
3
Facebook Twitter Google + Pinterest
previous post
How to Automatically Login to Windows 10 without a Password?
next post
Remote Session Disconnected: No Remote Desktop License Servers/Client Access Licenses Available

Related Reading

Using Previous Command History in PowerShell Console

January 31, 2023

How to Install the PowerShell Active Directory Module...

January 31, 2023

Finding Duplicate E-mail (SMTP) Addresses in Exchange

January 27, 2023

How to Disable or Uninstall Internet Explorer (IE)...

January 26, 2023

How to Delete Old User Profiles in Windows?

January 25, 2023

1 comment

Jean da Silva December 9, 2021 - 10:08 pm

Can I see who is a member of the Dynamic Group in Outlook using PowerShell?
When I created one in Exchange, I can’t see who is a member of the DL.

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Using Previous Command History in PowerShell Console

    January 31, 2023
  • How to Install the PowerShell Active Directory Module and Manage AD?

    January 31, 2023
  • Finding Duplicate E-mail (SMTP) Addresses in Exchange

    January 27, 2023
  • How to Delete Old User Profiles in Windows?

    January 25, 2023
  • How to Install Free VMware Hypervisor (ESXi)?

    January 24, 2023
  • How to Enable TLS 1.2 on Windows?

    January 18, 2023
  • Allow or Prevent Non-Admin Users from Reboot/Shutdown Windows

    January 17, 2023
  • Fix: Can’t Extend Volume in Windows

    January 12, 2023
  • Wi-Fi (Internet) Disconnects After Sleep or Hibernation on Windows 10/11

    January 11, 2023
  • Adding Trusted Root Certificates on Linux

    January 9, 2023

Follow us

woshub.com
  • Facebook
  • Twitter
  • RSS
Popular Posts
  • Outlook Keeps Asking for Password on Windows
  • How to Manually Configure Exchange or Microsoft 365 Account in Outlook 365/2019/2016?
  • Whitelist Domains and Email Addresses on Exchange Server and Microsoft 365
  • How to Cleanup, Truncate or Move Log Files in Exchange Server 2013/2016/2019?
  • Moving Exchange Mailboxes to Different Database
  • Fix: Microsoft Outlook Search Not Working on Windows 10/11
  • Export Exchange or Office 365 Global Address List (GAL) to CSV
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top