Link to home
Start Free TrialLog in
Avatar of chance-gp
chance-gpFlag for South Africa

asked on

How do I create a script that automatically adds a new user to my distribution group and adds default details according to their OU

Hi Everyone

Evertime I create a new user in any organistaonal unit, I have to manually add them to the global distribution group (Eg. Company_ALL), which is used for sending mail to all staff.

Also I have to add the same details to each new user in that organisational unit (Eg, street address, branch name, fax no.)

I want to know how I can automate this process so if I create a new user, it must be added automatically to the global distro group and their default details must be added as well.

Thanks
Avatar of Justin Owens
Justin Owens
Flag of United States of America image

When you create your new user, why not just copy another user who has the rights/groups that you want instead of creating a new one from scratch?  To script that would be ... cumbersome.  It would also be a pretty big security risk, as your script would have to have admin rights and be scheduled to run at specific times.  You would also have to probably make use of a Custom attribute to make sure the script only runs once on an account to prevent from overwriting later on.
Avatar of chance-gp

ASKER

Thanks DrUltima

How do I copy another users details in the same OU?
ASKER CERTIFIED SOLUTION
Avatar of Justin Owens
Justin Owens
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Kent Dyer
Kent Dyer
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi

Copying does not work as it does not copy the street address and telephone numbers, only the description and the Company name.
"Copy" also copies security group membership, saving you a step.  You can use ADModify to mass edit all users in an OU.