Exchange Distribution Groups: Your How

choubertsprojects

The Best WordPress plugins!

1. WP Reset

2. WP 301 Redirects

3. WP Force SSL

Today, new technology brings a lot of change. From the way we communicate to the way we shop and how we learn, these changes are often not something that people see coming or choose to embrace until it is too late. When you get into your car one day and realize it has been replaced with an automated version that doesn’t need manual labor anymore because manufacturers have created robots capable of doing everything humans can do in less time for cheaper than human workers previously could, this is what happened on top of our heads without any warning.

An “exchange distribution list vs group” is a set of users that are assigned to an email address. The difference between the two is that an “exchange distribution list” can be used with any email address, while a “group” requires membership in an Active Directory domain.

Exchange Distribution Groups: Your How

Exchange distribution groups are a subset of your organization’s address book that include recipient email addresses. As an Exchange administrator, this is a subject you should be well-versed in. Do you know how to use the Exchange Admin Center (EAC) and PowerShell to administer distribution groups? If you don’t, you will!

This article will show you how to establish, edit, and remove various Exchange distribution group types using both the GUI and PowerShell methods.

The EAC will be used in the first part of the course, while PowerShell will be used in the second half. Happy studying!

Prerequisites

The following needs are required if you wish to follow the directions in this article.

How to Use the PowerShell Module for Exchange Online V2

Exchange Distribution Groups: An Overview

Admins combine receivers into a single point of contact for delivering emails called a distribution group to handle many Exchange email accounts as one.

Distribution lists are another name for distribution groups.

Static and dynamic distribution groups are available on Exchange.

  • Static distribution group – You have a static distribution group if you have to manually add or delete receivers from it.

Universal distribution groups (UDGs) and mail-enabled universal security groups are the two types of static distribution groups (security groups or USGs).

The main function of UDGs is to deliver emails. When you send an email to a UDG, a copy of the message is sent to each group member’s inbox.

USGs are similar to UDGs, except they are also capable of assigning resource access rights.

  • Members of a dynamic distribution group are automatically updated depending on a set of dynamic rules. Dynamic distribution groups, also known as dynamic distribution lists, are a kind of dynamic distribution group (DDLs). Filters are used by a DDL to analyze its members.

Using the EAC to Create Static Exchange Distribution Groups

Let’s get started with the tutorials by building a static distribution group using the EAC.

Creating a UDG and a USG are similar, but to show how to create both kinds of groups, the settings below show group formation in tandem and point out any variations in settings.

Follow these procedures to establish an EAC distribution group.

1. Go to the EAC and log in using your web browser.

2. In the EAC, navigate to Recipients —> Groups —> Add a group. The add group wizard will show up.

Creating a groupCreating a group

3. On the Choose a group type page, you’ll see a list of possible groups to create. Next, choose whether to establish a UDG or USG Distribution option.

Choosing the kind of distribution groupChoosing the kind of distribution group

4. In the Name box on the Set up the fundamentals page, put the name and description you wish to give the new distribution group. This tutorial will make a UDG and a USG, respectively, termed UDG1 and USG1.

Providing a name and description for the distribution groupProviding a name and description for the distribution group

5. Next, on the Edit settings page, provide the following parameters for the UDG or USG you’re creating:

The settings for a UDG and a USG are different below. Each setting name will have either [UDG] or [USG] attached to it to distinguish the two kinds. If neither [UDG] nor [USG] are supplied, the option applies to both kinds of groups.

  • To create a group email address, start by typing the username portion of the email address into the box. After the @ symbol, choose an email domain from the selection list.
  • To enable email from external senders to be sent to the distribution group, tick the box. Allow email to be sent to this Distribution group from outside my organization. Otherwise, the default is to leave the box unchecked.
  • Permission [USG]: Check the Demand owner approval to join the group box to require the group owner’s approval when users wish to join the group. Otherwise, the default is to leave the box unchecked.
  • Joining the group [UDG]: This option gives users three alternatives for joining the group.
    • Open – This is the default setting, which enables anybody to join the group without the permission of the group owner.
    • Closed – If you choose this option, only the group owners will be able to add new members to the group.
    • Owner approval – Users may request to join the group using this option, and owners must approve the request.
  • Leaving the group [UDG]: Depending on the parameters below, group members may quit the group.
    • Members may quit the distribution group without the permission of the group owner if they choose this option.
    • Closed — When this option is selected, members are unable to leave the group. Members may only be removed by the group’s owners.

6. Click Next after adjusting the group options.

Exchange Distribution Group Settings ConfigurationExchange Distribution Group Settings Configuration

7. Review the summary of options on the Review and complete creating group page. Click Create group to begin building the new distribution group.

Reviewing and completing the formation of the distribution groupReviewing and completing the formation of the distribution group

8. Finally, on the progress screen for distribution group formation, click Close.

The wizard for creating Distribution groups is now closed.The wizard for creating Distribution groups is now closed.

Using the EAC, you may add and remove members and owners of static exchange distribution groups.

You’ve only learnt how to build Exchange distribution groups with default parameters so far. However, the group currently has no members, therefore an email distribution group without members is pointless. Let’s modify that and add additional people to the mix.

The procedure for upgrading a UDG or USG’s group members is the same.

1. Go to the EAC and log in using your web browser.

2. In the EAC, navigate to Recipients —> Groups.

3. Depending on which sort of distribution group you want to change, select the Distribution list or Mail-enabled security tab on the Groups page. The Distribution list tab will be used in this case.

Click the UDG you wish to change in the list of distribution lists, and a fly-out page appears. This example will update the UDG1 generated in the previous section.

To update, choose a distribution group.To update, choose a distribution group.

4. On the fly-out screen, click the Members tab. Click the View all and manage members option under the Members section.

The Manage Group Members menu appears.The Manage Group Members menu appears.

5. Once you’re on the Add Members page, either use the search box to find the new members or choose them from the list. After you’ve chosen your new members, click Add.

Choosing new members to includeChoosing new members to include

6. After you’ve saved your modifications, you’ll receive a confirmation page like the one below. Return to the main fly-out page of the distribution group by clicking the back arrow.

Returning to the attributes of the distribution groupReturning to the attributes of the distribution group

7. The new members are now included on the distribution list page, as seen below. Click the X in the upper-right corner to end the distribution group fly-out page.

Viewing the newly added membersViewing the newly added members

8. Assume you need to get rid of one or more group members. To do this, return to the Members fly-out page (refer to steps 1 to 4).

9. Next, choose the people you wish to remove from the group and click Remove members.

Members of the group are being removed.Members of the group are being removed.

10. When prompted to confirm the removal of the group member, choose Yes.

Confirming the withdrawal of group membersConfirming the withdrawal of group members

The person who formed the distribution group automatically becomes its owner. Follow the same steps to add or delete distribution group owners. However, rather than choosing View all and manage members (step 4), you should click View all and manage owners.

Using the EAC to Create Dynamic Exchange Distribution Groups

Static groups are restricted to recipients you create and delete explicitly. Dynamic groups are best if you have a pre-defined set of criteria to match certain receivers. You may use dynamic groups to specify multiple criteria that will automatically match recipients and add/remove them depending on those filters.

To use the EAC to build a dynamic distribution group:

1. Go to the EAC and log in using your web browser.

2. In the EAC, navigate to Recipients —> Groups —> Add group.

3. Select Dynamic distribution from the Choose a group type page and click Next.

Selecting a Dynamic Distribution GroupSelecting a Dynamic Distribution Group

4. In the Name box on the Set up the fundamentals page, input the name you wish to give the new dynamic distribution group. DDL Accounts is the name in this case.

5. Type a description for the dynamic distribution group in the Description box and click Next.

Adding the group's name and descriptionAdding the group’s name and description

6. When you’re on the Assign Users page, do the following:

  • In the Owner box, type the group owner’s name.
  • Select the recipient categories you wish to include in the group under the Members section. You may choose from the following options:
    • All categories of recipients
    • Users who have an Exchange mailbox
    • Users with external email addresses should be sent
    • Mailboxes for resources
    • External email addresses for mail contact
    • Groups with email access

In this example, choose only Users who have an Exchange mailbox.

Select Department from the selection box, then enter Accounts into the next field. This is the DDL filter that you’re using. Any new account added to the Accounts department will instantly become a member of this DDL if the Department is set to Accounting.

Owner selection and membership filterOwner selection and membership filter

7. On the Edit options screen, write the email address you want to give to the group and choose your Exchange organization’s email domain. Select Next.

Adding the email address for the dynamic distribution listAdding the email address for the dynamic distribution list

8. Review the dynamic distribution parameters and click Create group on the Review and complete adding group page. The Group type is set to Dynamic distribution in the example below.

Putting together the dynamic distribution groupPutting together the dynamic distribution group

9. Finally, click Close on the confirmation screen.

The wizard for creating dynamic distribution groups is now closed.The wizard for creating dynamic distribution groups is now closed.

EAC Address Book Visibility Configuration

You may need to block normal users from sending emails to distribution groups on occasion. Exchange administrators and group owners may achieve this by hiding distribution groups from the organization’s address book.

Changing a group’s visibility in EAC is only relevant to dynamic distribution groups as of this writing. You can only control the visibility of UDG and USG using PowerShell.

Using the EAC, hide or unhide a group:

1. Go to the EAC and log in using your web browser.

2. In the EAC, navigate to Recipients —> Groups —> Dynamic distribution list.

3. Select the group you wish to update from the list of groups. DDL Accounts will be used to alter this example.

Selecting the editing groupSelecting the editing group

4. Go to the Settings tab on the Dynamic distribution list group page.

Check or uncheck Hide from my organization’s global address list under General options. Unchecked indicates the group will be displayed in the address book, while checked implies it will be hidden.

After you’ve finished modifying, click Save.

After editing, saveAfter editing, save

Using the EAC to Configure Delegate Permissions

Delegates in distribution groups may send emails using the group’s email address. Send As and Send on behalf are the two forms of delegated sender permissions. What is the distinction?

When a delegate has the Permission to Send As a Distribution Group, he or she may use the group’s email address to send messages. Instead of the user’s email address, the receivers would see the group’s.

If a sender’s delegate permission to the group is Send on behalf, the recipients would see the sender as <sender> on behalf of <group> in the email’s From field.

If a delegate has both the Send As and Send On Behalf distribution group permissions, the Send As permission takes priority.

Follow the steps below to add delegates to a group.

1. Go to the EAC and log in using your web browser.

2. In the EAC, navigate to Recipients —> Groups.

3. On the Groups page, choose the appropriate tab for the kind of distribution group you want to update (Distribution list, Mail-enabled security, or Dynamic distribution list). This example will modify the DDL Accounts dynamic distribution list.

Selecting the editing groupSelecting the editing group

4. On the Dynamic distribution list group page, click on the Settings tab —> Edit manage delegates.

The delegate editor is now open.The delegate editor is now open.

5. In the Add a delegate box on the Edit delegates page, insert the new delegate’s name or email address to search. To add a name to the delegates list, click the name from the results.

6. For each delegate you added to the list, pick the Permission type. Send As and Send on behalf are the two options.

7. Click Save changes after you’ve finished providing rights.

Delegate editingDelegate editing

EAC Sender Restrictions Configuration

Every distribution group you form in your company has a specific function. Internal communications only, internal and external communications, or chosen senders only may be allowed by a group. Whatever the cause, keep in mind that these limits may be applied to any distribution groups as required.

To establish a group’s sender limitations, follow these instructions.

1. Go to the EAC and log in using your web browser.

2. In the EAC, navigate to Recipients —> Groups.

3. On the Groups page, choose the appropriate tab for the kind of distribution group you want to update (Distribution list, Mail-enabled security, or Dynamic distribution list). This example will modify the DDL Accounts dynamic distribution list.

Selecting the editing groupSelecting the editing group

4. On the Dynamic distribution list group page, click on the Settings tab —> Edit delivery management.

The delivery management editor is now open.The delivery management editor is now open.

5. Choose one of the two choices under the Sender options section of the Delivery management page.

  • Allow only texts from individuals within my company – To enable just internal communications, choose this option. External senders will be automatically rejected by the group.
  • Allow communications from both inside and outside my company – By selecting this option, the group will be able to receive messages from both internal and external senders.

Next, put the sender’s email address or name into the search box to limit who may send messages to the group. To add a name from the results as a permitted sender, click it. If you don’t want senders’ email delivery to be restricted, skip this step.

When you’ve finished configuring the group, click Save changes.

Setting up delivery constraintsSetting up delivery constraints

EAC deletes Exchange Distribution Groups

When a distribution group is no longer needed—for example, a distribution group for a project that has already ended—deleting the group is a smart maintenance practice. In only a few steps, you may remove groups from EAC.

1. Go to the EAC and log in using your web browser.

2. In the EAC, navigate to Recipients —> Groups.

3. On the Groups page, choose the appropriate tab for the kind of distribution group you want to remove (Distribution list, Mail-enabled security, or Dynamic distribution list).

4. Select the three-dot button (More actions) adjacent to the group you wish to remove from the list of groups. This example will remove the UDG UDG1.

5. Select Delete group from the dropdown menu.

Using EAC to delete a distribution groupUsing EAC to delete a distribution group

6. Select Delete group from the confirmation popup.

Confirming the group's deletionConfirming the deletion of the group

Using PowerShell to Create Static Exchange Distribution Groups

It’s time to use PowerShell to get into the command line! You’ve been utilizing the EAC throughout this lesson. However, you don’t have to point and click your way to managing Exchange. Instead, you may use the command line to control Exchange distribution groups and create some useful PowerShell scripts!

Use the New-DistributionGroup cmdlet in PowerShell to build distribution groups. With this cmdlet, you may construct a UDG or a USG with only one line of PowerShell code.

You formed a distribution group using EAC with just the default options in the previous step. Let’s use the New-DistributionGroup cmdlet to do the same thing. To do so, use the PowerShell command below. This command creates a new UDG named UDG2 using the email address [email protected] and the name UDG2. Make sure the email domain is set to yours first.

Instead, add the -Type Security argument to the command to build a USG. The cmdlet will establish a mail-enabled security group if this option is specified.

To establish a USG called USG2 with the email address [email protected], run the command below in PowerShell. Make sure the email domain is set to yours first.

Using PowerShell to Manage Members and Owners of Static Exchange Distribution Groups

As you’ve learned in an earlier section, adding and Members of the group are being removed. and owners follows the same steps using the EAC. But when it comes to PowerShell, the steps are a mix of different cmdlets.

Adding and Removing Members from Distribution Groups

The Add-DistributionGroupMember and Remove-DistributionGroupMember cmdlets may be used to add and remove distribution group members. In the example below, a distribution group member ([email protected]) is added and removed from the UDG [email protected].

What happens if you need to add or delete several members? You may do this by defining each member in a PowerShell array of member IDs and then sending that array to the needed function.

Notice how -Confirm:$false is used. Remove-DistributionGroupMember will prompt you before deleting a member by default. To disable this popup, use the Confirm argument.

It’s impractical to manually add members to an array if you have a large number of them. Instead, generate a text file with the list of members’ identities and import it into your PowerShell session using the Get-Content cmdlet.

# Make the group bigger. | Add-DistributionGroupMember -Identity [email protected] | get-content.members.txt # Get-content.members.txt | Remove-DistributionGroupMember -Identity [email protected] # Remove people from the group and skip confirmation -Confirm:$false

Get-Content in PowerShell: Reading Text Files Like a Boss

Owners of Distribution Groups Can Be Added and Removed

There are occasions when the ownership of a group must shift. A change in leadership may result in a change in ownership of a team’s distribution group. To do so, use the ManagedBy argument with the Set-DistributionGroup cmdlet.

Run the PowerShell code below to assign a new owner to a distribution group. Make sure the ManagedBy value is set to the new owner’s identity first. The command below sets [email protected] as the owner of the distribution group UDG2.

# There should only be one owner for the present distribution group. Set-DistributionGroup -Identity UDG2 -ManagedBy [email protected] Set-DistributionGroup -Identity UDG2

There may be several owners for distribution groups. Change the ManagedBy values to an array of owner identities (e.g. -ManagedBy ‘owner1′,’owner2’) as seen in the code below to assign multiple owners.

You may not wish to replace all of the present owners, on the other hand. Create a PowerShell hashtable with a key of either add or remove indicating the action you’d want to perform and a value of the recipient’s address ([email protected]) to add or remove owners without altering the existing owners’ list.

The code below adds an owner of [email protected] to the UDG2 distribution group and removes the owner [email protected].

Set-DistributionGroup -Identity UDG2 -ManagedBy @add=”[email protected]” # Add a new owner Set-DistributionGroup -Identity UDG2 -ManagedBy @remove=”[email protected]” # Remove an owner

Using PowerShell to Create Dynamic Exchange Distribution Groups

Creating DDLs with EAC is certainly convenient. The membership filters, on the other hand, are confined to a set of qualities.

When writing a DDL in EAC, there are just a few membership filtering characteristics to pick from. Company, Department, State or Province, and Custom Attribute are the only characteristics allowed (1-15). Visit Filterable properties for the RecipientFilter argument on Exchange cmdlets to learn more about all the filterable qualities.

PowerShell comes in handy when you need to write a DDL with a filter that contains a characteristic that isn’t accessible in EAC. Because the title property is not accessible in EAC, you can only build a DDL that contains members based on title in PowerShell.

Invoke the New-DynamicDistributionGroup cmdlet in PowerShell to establish a dynamic distribution group, as seen below. This code creates a new DDL with the title of director or manager as members.

# Add new DDL attributes like name, email address, and recipient filter. @ $ddl splat Identifier = “PrimarySMTPAddress = “[email protected]” DDL Directors and Managers (RecipientType -eq ‘UserMailbox’) -and (Title -eq ‘Director’ -or Title -eq ‘Manager’) “‘ # Create the @ddl splat DDL New-DynamicDistributionGroup

Splatting in PowerShell: What Is It and How Does It Work?

Using PowerShell to List Group Members

The EAC allows you to see distribution group members, but you can’t export the list. Furthermore, seeing members of dynamic distribution lists is not feasible in the EAC.

What if you need to export the membership list? Perhaps for the sake of reporting or auditing, or to validate that your dynamic distribution groups have members. You’ll need PowerShell to do these tasks.

Members of the Static Exchange Distribution Group

You may quickly identify all members of a static distribution group by using the Get-DistributionGroupMember cmdlet. The command to execute is the same whether the group is a UDG or a USG. To list the members of the distribution group UDG2, for example, use the PowerShell command below.

The Select-Object cmdlet is used in the example below to restrict the attributes shown. This command is not required.

# Get a list of UDG2 members | Include simply their name and email address. Select-Object Name,PrimarySMTPAddress | Get-DistributionGroupMember -Identity UDG2

The command completes and lists the members of the UDG2 distribution group, as seen below.

Members of the distribution groupMembers of the distribution group

Members of the Dynamic Exchange Distribution Group

It takes a little more effort to locate current members of a dynamic distribution group. To do so, locate the RecipientFilter string in the DDL. This is the string that Exchange uses to apply the filter to the popular dynamic distribution group. The members of the distribution group may then be found using this string.

Locate the Filter for Recipients

Use the Acquire-DynamicDistributionGroup cmdlet to get the filter string. RecipientFilter is one of the properties returned by this cmdlet. To get the text, use the command below, which only returns the value of the DDL Directors and Managers group’s RecipientFilter property and assigns it to the variable $filter.

$filter = (Get-DynamicDistributionGroup -Identity “DDL Directors and Managers”) # Get the DDL’s RecipientFilter string. RecipientFilter

Identify the Recipients

Pass the filter string to the Get-Recipient cmdlet’s RecipientPreviewFilter argument once you have it. You may also use the Select-Object cmdlet to return certain properties, as seen in the code below.

# Show the name, title, and email address of recipients who match the DDL’s RecipientFilter string Select-Object Name,Title,PrimarySMTPAddress | Get-Recipient -RecipientPreviewFilter $filter

The retrieved dynamic distribution group members based on the recipient filter are shown in the image below.

Members of the dynamic distribution groupMembers of the dynamic distribution group

Members of the Exporting Distribution Group

You can export the member list to a file now that you know how to list group members. To do so, use the Export-Csv cmdlet, which allows you to export PowerShell objects to CSV files.

Converting Objects to CSV Files (Export-Csv)

# Get a list of UDG2 members | List just their names and email addresses | Save as a CSV file Select-Object Name,PrimarySMTPAddress | Export-Csv -Path.udg members.csv -NoTypeInformation | Get-DistributionGroupMember -Identity UDG2 # Show the name, title, and email address of recipients who match the DDL’s RecipientFilter string | Export to a CSV file Select-Object Name,Title,PrimarySMTPAddress | Export-Csv -Path.DDL members.csv -NoTypeInformation | Get-Recipient -RecipientPreviewFilter $filter

Using PowerShell to Set Address Book Visibility

You can use PowerShell to conceal or unhide distribution groups from the global address book, much like the EAC.

Static Distribution Groups are hidden.

Invoke the Set-DistributionGroup cmdlet with the name of the distribution group and the HiddenFromAddressListsEnabled parameter as shown below to conceal and unhide static distribution groups.

Set-DistributionGroup -Identity UDG1 -HiddenFromAddressListsEnabled # Hide the UDG in the address book $true Set-DistributionGroup -Identity UDG1 -HiddenFromAddressListsEnabled $false to reveal the UDG in the address book.

Exchange Online refreshes the offline address book every 24 to 48 hours, thus any address book changes in Outlook’s offline address book may not appear until then.

Dynamic Distribution Groups are hidden.

You’ll need two cmdlets to conceal and unhide dynamic distribution groups from the global address book: hide and unhide.

Use the Set-DynamicDistributionGroup cmdlet to conceal a dynamic distribution group. This cmdlet lets you adjust the attributes of a dynamic distribution group, including the group’s address book visibility.

The PowerShell command to unhide a dynamic distribution group is the same as for a static distribution group.

# In the address book, hide the DDL. -Identity DDL Accounts -HiddenFromAddressListsEnabled Set-DynamicDistributionGroup $true Set-DistributionGroup -Identity DDL Accounts -HiddenFromAddressListsEnabled # Unhide the DDL in the address book $false

Using PowerShell to Configure Delegate Permissions

PowerShell, like the EAC, may set delegate rights for Exchange distribution groups, including Send As and Send on Behalf capabilities.

Permission to Send As a Distribution Group

To add Send As distribution group (static or dynamic) permission, use the Add-RecipientPermission PowerShell cmdlet. This cmdlet allows you to add Permission to Send As a Distribution Group to a trustee.

A mailbox user or a mail-enabled security group may be a valid trustee.

To add the Permission to Send As a Distribution Group, run the command below in PowerShell. This command gives the recipient [email protected] rights to send as the distribution group UDG2. The AccessRights parameter only accepts SendAs as its value.

Suppose the trustee no longer needs the Permission to Send As a Distribution Group, run the Remove-RecipientPermission to remove the trustee.

-Identity UDG2 -Trustee [email protected] Remove-RecipientPermission SendAs -AccessRights

Permission to Send on Behalf of Distribution Group

To configure Permission to Send on Behalf of Distribution Group, run the Set-DistributionGroup for a UDG or USG and Set-DynamicDistributionGroup for a DDL. Both cmdlets have a parameter called GrantSendOnBehalfTo, which accepts the identity of the delegate.

For example, the code below grants [email protected] Send on behalf authorization to a distribution group (GrantSendOnBehalfTo) (UDG2).

# Add the ability to send on behalf of a distribution organization (USG or UDG). @add=”[email protected]” Set-DistributionGroup -Identity UDG2 -GrantSendOnBehalfTo # For a distribution group, remove the Send on behalf permission (USG or UDG). @remove=”[email protected]” Set-DistributionGroup -Identity UDG2 -GrantSendOnBehalfTo # For a dynamic distribution group, add the Send on behalf permission. @add=”[email protected]” Set-DynamicDistributionGroup -Identity DDL Accounts -GrantSendOnBehalfTo # For a dynamic distribution group, remove the Send on behalf permission. @remove=”[email protected]” Set-DynamicDistributionGroup -Identity DDL Accounts -GrantSendOnBehalfTo

Using PowerShell to Set Sender Restrictions

Let’s set sender limitations using PowerShell now. Because you’ll be modifying the parameters of distribution groups, you’ll utilize Set-DistributionGroup and Set-DynamicDistributionGroup, just as you did in the previous sections.

Senders are limited to a Distribution Group.

RequireSenderAuthentication in a distribution group The enabled value defines whether or not the group enables external emails. The group receives emails from external senders if the value is $false. The group will only accept internal messages if the value is $true.

Run the code below in PowerShell to enable external and internal senders to join static and dynamic distribution groups. Change the Identity values to the identities of your organizations.

# Allow emails from both external and internal senders to reach the distribution group. Set-DistributionGroup -Identity USG2 -RequireSenderAuthenticationEnabled -RequireSenderAuthenticationEnabled $false # Allow emails from both external and internal senders to reach the dynamic distribution group. -Identity DDL Accounts -RequireSenderAuthenticationEnabled Set-DynamicDistributionGroup $false

Change the RequireSenderAuthenticationEnabled to $true in the code below to enable only internal senders.

# Only allow internal senders to send emails to the distribution group. Set-DistributionGroup -Identity USG2 -RequireSenderAuthenticationEnabled -RequireSenderAuthenticationEnabled $true # Only allow internal senders to send emails to the distribution group. -Identity DDL Accounts -RequireSenderAuthenticationEnabled Set-DynamicDistributionGroup $false

Adding Acceptable Senders

Suppose you want more granular control as to who can send emails to the group. You can do so by Adding Acceptable Senders.

To allow particular senders, use the AcceptMessagesOnlyFrom argument to indicate the senders’ identities. In the example below, only one user is permitted to send messages.

Mailboxes, mail users, and mail contacts are all valid AcceptMessagesOnlyFrom individual sender types.

# Add a distribution group to allowed-sender. Set-DistributionGroup -Identity USG2 -AcceptMessagesOnlyFrom [email protected] Set-DistributionGroup -Identity USG2 # Add a dynamic distribution group to allowed-sender. Set-DynamicDistributionGroup -Identity DDL Accounts -AcceptMessagesOnlyFrom [email protected] Set-DynamicDistributionGroup -Identity DDL_

In the AcceptMessagesOnlyFrom property, give an array of sender IDs to add more than one sender.

Instead, use this syntax to add or delete approved senders without impacting existing entries in the AcceptMessagesOnlyFrom parameter.

  • To add sender groups, use @add=”sender1″,”sender2″
  • Remove sender groups using @remove=”sender1″,”sender2″

You may accept members of other groups in addition to individual senders. To do so, use the AcceptMessagesOnlyFromDLMembers argument to provide the group’s identification, as demonstrated in the code below.

Distribution groups, mail-enabled security groups, and dynamic distribution groups are all valid AcceptMessagesOnlyFromDLMembers group sender types.

# Create a distribution group with the allowed-sender group. -Identity USG2 -AcceptMessagesOnlyFromDLMembers Set-DistributionGroup UDG2 # Create a dynamic distribution group using the allowed-sender group. Set-DynamicDistributionGroup -Identity DDL Accounts -AcceptMessagesOnlyFromDLMembers “DDL Directors and Managers” Set-DynamicDistributionGroup -Identity DDL Accounts

Apply the following syntax with AcceptMessagesOnlyFromDLMembers to add or delete approved group senders without impacting all current entries.

  • To add sender groups, use @add=”group1″,”group2″
  • Remove sender groups with @remove=”group1″,”group2″

Using PowerShell to delete Exchange Distribution Groups

Finally, it’s time to use PowerShell to clean up and delete certain distribution groups. Use the Remove-DistributionGroup cmdlet to eliminate static distribution groups and the Remove-DynamicDistributionGroup cmdlet to delete dynamic distribution groups.

The USG2 static group and the DDL Accounts dynamic group are removed using the instructions below.

Remove-DistributionGroup -Identity USG2 # Deleting a static distribution group Remove-DynamicDistributionGroup -Identity DDL Accounts # Deleting a dynamic distribution group

To confirm the deletion of the group, hit Enter to pick the default option (Yes) at the confirmation screen.

Confirming the deletion of a static distribution groupConfirming the deletion of a static distribution group

Conclusion

The most frequent activities that an admin may conduct on static and dynamic distribution groups were covered in this article. You discovered that the actions you can do in EAC have PowerShell counterparts.

However, PowerShell allows you to do a lot more than EAC does. The official Exchange Online PowerShell documentation may help you learn more about dealing with distribution groups in PowerShell.

The “new-distributiongroup” is a command that creates a new distribution group. The command has been around for a while, but it was not until recently that the command became widely used.

Related Tags

  • active directory distribution group vs exchange distribution group
  • ad distribution group not showing in exchange
  • set-distributiongroup
  • office 365 allow user to manage distribution group
  • distribution list management tool

Table of Content