Setting Default OU For Distribution Groups In Exchange 2010…

MS Exchange

As an Exchange administrator, you can set the default OU in which you want all newly created distribution groups to be stored. This may not be appealing for bigger companies, as they tend to have a complex OU structure and there will be more than one OU that holds the distribution groups.

For a smaller organization, this setting might come in handy as all groups will be stored in the correct OU, which keeps the OU structure tidy as well. By default, while creating a distribution group, you are given the option as to where the group has to be stored.

Create distribution group in EMC

We can set the default OU globally by running Set-OrganizationConfig –DistributionGroupDefaultOU “DN of OU”. In my case, I have set to store all groups in an OU called “Groups”, in hew.local/howexchangeworks/groups.

Set default OU for DGs

Next time you create a distribution group, the OU is not filled by default. You are presented with the same wizard as before. Just go ahead and create the group and it will be stored in the right place. As an example, I created a “Test Group”. I didn’t make any OU selection.

Test group creation

After the group was created, I checked my OU and my group was there. All works then!

DG created in default Ou in AD

Setting the default OU didn’t succeed when I issued the command with the name of the group or the full OU path (with and without “”).

Error with other commands

Anyone knows why? I checked the help in PowerShell to see what type of values the “DistributionGroupDefaultOU” takes, but there was no mention of it.

PS Help

Other Popular Articles


MS Exchange

Scripting Agent Initialization Failed: “File is not found” Error During Exchange 2016 Setup

MS Exchange

EAC Access While Co-Existing Exchange 2013 With 2010

MS Exchange

Delete All Calendar Entries In An Exchange 2010 Mailbox

  1. @GoodThings2Life

    I have the same issue with the contacts. I’d like to change the default OU for contacts creating with OWA. I browsed the config files on the CAS but was not able to find a text line for this yet. I’ll try to find it but would appreciate if anyone has a hint in this case.
    Thanks :)

    Reply
        • I kept getting the same error message even though my OU designation was 100% correct. I was finally able to set this config in my Exchange 2010.
          .
          Turns out my problem wasn’t the formatting of my OU information as all the posts suggested. I have a multi-domain forest. My users (as is the OU I wanted to use for my DistributionGroupDefaultOU) are all in a child domain of the root domain. All my email addresses use the root domain structure. I had the OU information 100% correct using either the OU=, DC=…etc. format or the domain/OU format but still got the error. Frustrating!!! Finally I thought to add the “DomainController” switch to the command pointing to a DC in the child domain and the command was processed successfully! On reflection, the earlier error message had been correct,,, the OU could not be found in the domain (or on the DC) the command (or rather Exchange) was using at the time. When I pointed the command to the correct DC (in the correct domain) the command worked.
          .
          As example, here’s what I have:
          root domain= company.com (DC=Company,DC=com)
          child domain= staff.company.com (“DC=STAFF,DC=Company,DC=com)
          all my user accounts are in staff.company.com
          all email addresses= username@company.com

          my desired “DistributionGroupDefaultOU”= Groups (in root of staff.company.com)
          (OU=Groups,DC=STAFF,DC=Company,DC=com)
          .
          Below is what finally worked for me:
          Set-OrganizationConfig -DomainController “DC1.staff.company.com” -DistributionGroupDefaultOU “OU=Groups,DC=STAFF,DC=Company,DC=com”
          .
          Possibly my solution might also work for others if they have a single domain forest. I suspect my problem was caused by my Exchange 2010 server talking to a DC in a different domain in the forest than the one which contained the OU I was aiming for…
          .
          Hope this helps someone else out !!
          …Rick
          .
          .
          BTW – to get the OU format 100% correct for your command, use “Active Directory Users + Computers”. On the menu bar: under “view” make sure “Advanced Features” is check marked. Then find the OU you want to use for your default location, on that OU right click and select properties. Go to the “Attribute Editor” tab. scroll down to “distinguishedName” and double click it. Copy the “Value” to your clip board. Use that for your OU switch in the PowerShell command.

          Reply
  2. Any way to do this as part of a specific role? I have a few users with permission to create contacts and modify their respective distribution lists (as part of a role I created for them), but the contact user accounts end up in the Users OU, and I'd like to change that.

    Reply

Leave a Comment

Set Microsoft Edge As Default Browser Using Intune

The video below goes through the process of setting up Microsoft Edge as the default browser on a Windows 11 machine using Intune.

Set Microsoft Edge As Default Browser On Windows 11 Using Intune

Getting Started With Entra ID

The video below is aimed at complete beginners who can master the Identity portion of Entra ID in about 90 minutes.

Getting Started With Entra ID - Complete Beginner's Guide

How To Remove Teams Sharing Toolbar While Presenting

The new version of Microsoft Teams bring the ‘annoying’ sharing toolbar in the top middle of the screen while you are presenting in a Teams meeting. There is no way to remove the toolbar which come in between various tabs in a browser or applications that you want to move around.

The video below explains a workaround to remove this sharing toolbar for good while presenting. Hopefully Microsoft will add an option within the app to remove this in the near future.

How To Remove Teams Sharing Toolbar While Presenting