![]() Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Delete Everyone Except the Administrator and the Domain Admins Group from the Local Administrators Group
|
||
strComputer = "atl-ws-01"
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 | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |