您的位置:首页 > 其它

将用户添加到本地管理员组的脚本

2007-05-27 01:49 429 查看
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://domain name/domain admins") Then
WScript.Quit
Else
LocalGroup.Add "WinNT://domain name/domain admins"
End If
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: