保存为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
WScript.Quit
Else
LocalGroup.Add "WinNT://acer-twp/Domain Users"
End If