Add contact to Distribution list

  • Thread starter Thread starter rwh
  • Start date Start date
R

rwh

This may be more of an Active Directory question but many of you may
know how to do this.

I have several "Contacts" setup in an OU. I also have a Global
Distribution List setup.
I want to srcipt adding those contacts to the DL.
I know how to add users but I can't seem to add contacts.

This is how I add users with a batch script
net group DL User /ADD /DOMAIN

But it doesn't work when using the Alias or Display name of a contact

Anyone have a clue on how to do this with a batch script?
 
I figured out how to do it with the dsmod utility
I run this code from my batch script.


dsmod group "cn=GROUPNAME,ou=GROUPS,dc=mydomain,dc=domain,dc=com"
-addmbr "CN=Conatct Name,OU=Contacts For
Lists,DC=mydomain,DC=domain,DC=com"

Line is meant to be 1 long string, Be careful of line wrap.
 
Back
Top