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
chance-gpAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Justin OwensITIL Problem ManagerCommented:
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.
chance-gpAuthor Commented:
Thanks DrUltima

How do I copy another users details in the same OU?
Justin OwensITIL Problem ManagerCommented:
It is in the creation process....  Instead of clicking "New User", just pick the account you want to emulate, and right-click it and select "Copy".  If the new user is already created, you can't do that, obviously.  If you want to change large quanties of descriptions at a time in a non-scripted fashion, I would suggest the tool, ADModify.

http://www.computerperformance.co.uk/w2k3/utilities/admodify.htm
http://technet.microsoft.com/en-us/library/aa996216%28EXCHG.65%29.aspx

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

Kent DyerIT Security Analyst SeniorCommented:
I think you need to look into the use of ADSI Scriptomatic..

http://technet.microsoft.com/en-us/scriptcenter/dd939958.aspx

HTH,

Kent
chance-gpAuthor Commented:
Hi

Copying does not work as it does not copy the street address and telephone numbers, only the description and the Company name.
Justin OwensITIL Problem ManagerCommented:
"Copy" also copies security group membership, saving you a step.  You can use ADModify to mass edit all users in an OU.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Active Directory

From novice to tech pro — start learning today.