Solved

Script for creating mail enabled distribution lists.

Posted on 2008-10-14
5
401 Views
Last Modified: 2012-05-05
Hello,

i'm cleaning up AD mail enabled security groups. I want to remove their Exchange attributes so they are no longer mail enabled. However I would like to create the same name and append _DL . This way all AD objects with _DL will be mail enabled Global Ditribution lists. The members have to be copied over.
For example:
We now have in AD the Group "IT Dept" which is a mail enabled Global Security Group. We have 10 users in the member field added. So someone can write to "IT Dept@domain.com" and the 10 members get the email.
I would like to change it to:                      
"IT Dept_DL" and make it a Mail enabled Global Distribution Group and have all the 10 users copied over.

Because I have about 100 groups to do is there a way to have a script running that will do this instead of me doing it manually?

Much appreciate the help,
Tacobell2000
0
Comment
Question by:Tacobell2000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 4

Expert Comment

by:every1isevil2
ID: 22713031
Are you using exchange 2003 or 2007?
with 2007,  you can create dynamic distribution lists.
0
 

Author Comment

by:Tacobell2000
ID: 22713170
Ooops forgot to mention that I am running Exchange 2003 on a Windows 2003
0
 
LVL 18

Expert Comment

by:sk_raja_raja
ID: 22713422
0
 

Author Comment

by:Tacobell2000
ID: 22715531
I simply do not know whether this post http://www.experts-exchange.com/Programming/Languages/Scripting/Q_23100630.html would be usefuill in my situation.
0
 

Accepted Solution

by:
Tacobell2000 earned 0 total points
ID: 22715930
@echo off
setlocal
 
set oldgroupdn=cn=it_test,ou=it Groups,dc=lab,dc=com
set newgroupdn=cn=it_test_DL,ou=it Groups,dc=lab,dc=com
 
dsadd group "%newgroupdn%" -secgrp no -scope g
dsget group "%oldgroupdn%" -members | dsmod group "%newgroupdn%" -addmbr

This one is working beautifully. The only thing is I have 187 groups to create. There must be a txt file i can create and put it into the script somewhere.
Where can i put the txt file in the script?

Tacobell2000
0

Featured Post

Office 365 Training for Admins

Learn how to provision tenants, synchronize on-premise Active Directory, and implement Single Sign-On with these master level course.  Only from Platform Scholar

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In-place Upgrading Dirsync to Azure AD Connect
This article shows the method of using the Resultant Set of Policy Tool to locate Group Policy that applies a particular setting.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question