Clean up administrators group

strComputer = "."  
Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators")
For Each objUser In objGroup.Members
    If objUser.Name <> "Administrator" Then
        objGroup.Remove(objUser.AdsPath)      
    End If
Next 
   

本文出自 “Erick WAY” 博客,谢绝转载!

你可能感兴趣的:(UP,group,clean,administrators)