注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 可扩展、高可用、负载均衡..
 帮助

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


2007-05-27 01:49:26
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
 




    文章评论
 
2007-05-27 20:25:40
没怎么用过,不过依然顶了

2007-08-23 12:03:03
相关的文章请参考
http://gnaw0725.blogbus.com/logs/4888701.html

 

发表评论

昵   称:
验证码:  点击图片可刷新验证码  博客过2级,无需填写验证码
内   容: