Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Add Domain Group to Local Group

Status
Not open for further replies.

Grunty

Technical User
Jul 30, 2002
100
0
0
GB
Does anyone know of a script that will add the Domain\Domain Users group to the Local Power Users group on a computer?

Thanks
 
Try this:

Code:
Option Explicit
Dim strComp, oGrp, oUsr

On Error Resume Next
strComp = "."
Set oGrp = GetObject("WinNT://" & strComp & "/Power Users")
Set oUsr = GetObject("WinNT://YourDomain/Domain Users")
oGrp.Add(oUsr.ADsPath)

Spong
 
I like song's suggestion. But just ot give you choices, you can also use the Net localgroupcommand which is super easy.

I hope you find this post helpful.

Regards,

Mark
 
Too fast on that submit button. Sorry I meant spong.

I hope you find this post helpful.

Regards,

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top