This script works great on windows 2000 OS but does not work on Windows XP. Can someone help me figure this out??
Using Group Policy and a Script to Remove everyone except the administrator and the domain admins group form the local administrators group of workstations on CHCB domain.
strComputer = "."
Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators")
For Each objUser In objGroup.Members
If objUser.Name <> "Administrator" and objUser.Name <> "Domain Admins" Then
objGroup.Remove(objUser.AdsPath)
End If
Next
Using Group Policy and a Script to Remove everyone except the administrator and the domain admins group form the local administrators group of workstations on CHCB domain.
strComputer = "."
Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators")
For Each objUser In objGroup.Members
If objUser.Name <> "Administrator" and objUser.Name <> "Domain Admins" Then
objGroup.Remove(objUser.AdsPath)
End If
Next