relationship with active directory OU and exchange distribution list

Chinmoy Das 41 Reputation points
2021-12-11T02:21:40.027+00:00

I am new to this section(AD and exchange)
Can anyone tell me how I can send a mail through a distributionlist to everyone under a OU(organisation unit) my envirnment exchange 2019.

Windows for business | Windows Client for IT Pros | Directory services | Active Directory
Exchange | Exchange Server | Management
0 comments No comments
{count} votes

Accepted answer
  1. Manu Philip 20,206 Reputation points MVP Volunteer Moderator
    2021-12-11T07:08:59.3+00:00

    You can try the following PowerShell scripts

    1. Export all users in the OU as a csv file
       $OUpath = 'ou=Managers,dc=enterprise,dc=com'
       $ExportPath = 'c:\userlist.csv'
       Get-ADUser -Filter * -SearchBase $OUpath | Select-object EmailAddress | Export-Csv -NoType $ExportPath
      
    2. Add the members to the group. Make sure that the header value is EmailAddress Import-Csv “c:\userlist.csv” | foreach{Add-DistributionGroupMember -Identity “GroupName” -Member $_.EmailAddress}
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Manu Philip 20,206 Reputation points MVP Volunteer Moderator
    2021-12-11T04:51:19.66+00:00

    You can't send an email to all users under the OU until you have a distribution list ready with all those users.
    If you don't have the distribution list ready, start it here from Exchange Admin Center
    156804-image.png

    • Type Display name and alias of the group name. Under the Organization unit and click on browse
    • Select the particular OU you are looking for
    • Under Members click, so click the “+” icon
    • Select user you want to add in the group so click add and click ok
    • Select the necessary options as per your preference and click Save
    • Select the Distribution group you just created and click on edit and select Delivery Management, to choose senders inside/outside organization clicks on save
    • Login Outlook Web App > Select new mail and type Distribution group name you just created. Add necessary message, Subject line etc. and send email
    0 comments No comments

  2. Chinmoy Das 41 Reputation points
    2021-12-11T06:12:09.577+00:00

    hi ManuPhilip, thanks for your reply but i want to add all user of particular OU to a Distribution list buy a script or whatever it is.

    0 comments No comments

  3. Chinmoy Das 41 Reputation points
    2021-12-11T11:23:59.67+00:00

    thanks and well noted.

    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.