Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 320
  • Last Modified:

Script to add Domain group to Local Admin group

I am trying to write a script that will add a domain group to the local admin group of computers located in a certain OU. I have been able to write a script to this one by one and only if I state the computer name. Is there a way to do this for multiple computers contain in a certain OU?

Here is the script I have so far:

strComputer = "happy"
Set objAdmins = GetObject("WinNT://" & strComputer & "/Administrators")
Set objGroup = GetObject("WinNT://co/itdivision")
objAdmins.Add(objGroup.ADsPath)
0
Kimberly1467
Asked:
Kimberly1467
1 Solution
 
DonNetwork AdministratorCommented:
It would be much easier to do this with Restricted Groups IMO

http://www.frickelsoft.net/blog/?p=13
0
 
Neil RussellTechnical Development LeadCommented:
Definately use Group policy and restricted groups! Dont even consider a script.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now