'***********************************
'刪除本地ADMINISTRATORS組中的其它成員
'除administrator 及 Domain Admins
'***********************************
腳本如下
strComputer = "."
On Error Resume Next
Set oGroupAdm = GetObject("WinNT://" & strComputer & "/Administrators")
For Each oAdmGrpUser In oGroupAdm.Members
sAdmGrpUser = LCase(oAdmGrpUser.Name)
If (sAdmGrpUser <> "administrator") And (sAdmGrpUser <> "domain admins") Then
oGroupAdm.Remove oAdmGrpUser.ADsPath
End if
Next
阅读(1823) | 评论(0) | 转发(0) |