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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add other group to Local Administrators Group automatically

Status
Not open for further replies.

taopiglet

MIS
Joined
Mar 29, 2002
Messages
1
Location
US
I have a Windows 2000 Domain. When a new computer joins the domain, the Domain Admins account is automatically added to the Local Administrators Group on the workstation. I have a Client Support Global Group that I would like added to the Local Administrators Group automatically whenever a new computer joins the domain. Is there anyway to do this???
Thanks
 
This can be done with a VB script launched from the "startup script" in a group policy attached to the OU where your workstation objects reside - example:

Option Explicit
On Error Resume Next

Dim oContainer
Dim oGroup
Dim oIADs

Dim oComputerInformation

Set oComputerInformation = CreateObject("WScript.Network")

Set oContainer = GetObject("WinNT://" + oComputerInformation.ComputerName)

oContainer.Filter = Array("Group")

For Each oIADs In oContainer
If oIADs.Name = "Administrators" Then
Set oGroup = oIADs
oGroup.Add ("WinNT://domain/group")
oGroup.SetInfo
exit for
End If
Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top