PDA

View Full Version : Script works in windows 2000 but not XP (WXP-Pro)



cedtech23
03-15-2006, 02:13 PM
This script works great on windows 2000 OS but does not work on Windows XP. I am lost and need some help?? Thanks



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