Jun 28, 2005 #1 Grunty Technical User Joined Jul 30, 2002 Messages 100 Location 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
Does anyone know of a script that will add the Domain\Domain Users group to the Local Power Users group on a computer? Thanks
Jun 28, 2005 #2 PhilJackson Programmer Joined Mar 16, 2004 Messages 25 Location GB 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 Upvote 0 Downvote
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
Jun 28, 2005 #3 markdmac MIS Joined Dec 20, 2003 Messages 12,340 Location US 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 Upvote 0 Downvote
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
Jun 28, 2005 #4 markdmac MIS Joined Dec 20, 2003 Messages 12,340 Location US Too fast on that submit button. Sorry I meant spong. I hope you find this post helpful. Regards, Mark Upvote 0 Downvote
Too fast on that submit button. Sorry I meant spong. I hope you find this post helpful. Regards, Mark