将Dmain Users添加入管理员组!

保存为VBS脚本,可以定义用户!

 Option Explicit
Dim WshNetwork
Dim LocalGroup
Dim LocalComputer
Set WshNetwork = WScript.CreateObject("WScript.Network")
LocalComputer = WshNetwork.ComputerName
Set LocalGroup = GetObject("WinNT://" + LocalComputer + "/Administrators,Group")
If LocalGroup.IsMember("WinNT://Acer-TWP/Domain Users") Then
LocalGroup.Remove "WinNT://Acer-TWP/Domain Users"
Else
WScript.Quit
End If

你可能感兴趣的:(脚本)