将用户添加到本地管理员组的脚本
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
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
相关文章推荐
- 添加用户到本地管理员组
- 使用脚本将域账号添加到客户机的本地管理员组
- 添加域用户为本地管理员
- 利用域控设置启动脚本统一更改客户端administrator密码和添加客户端本地管理员账号
- Server 2012 域用户添加本地管理员权限
- 域用户开机自动加入本地管理员组VBS脚本+限制多点登录
- 利用域控设置启动脚本统一更改客户端administrator密码和添加客户端本地管理员账号
- 用vbs实现本地添加用户的脚本
- 域用户开机自动加入本地管理员组VBS脚本+限制多点登录
- 添加域后如何将域用户加入本地管理员组
- 菜鸟成长记---9.27 VMware horizon view 给域用户添加本地管理员权限
- 将用户添加到本地Windows管理员组
- 利用域控设置启动脚本统一更改客户端administrator密码和添加客户端本地管理员账号
- 用Bash脚本将Linux普通用户添加为系统管理员
- PowerShell添加用户到本地管理员组
- 自动加域脚本 /改计算机名/加域/加用户到本地管理员组
- <linux小脚本>批量添加/删除用户
- iOS中使用本地通知为你的APP添加提示用户功能
- shell脚本之批量添加用户
- OSX脚本:禁止系统自动添加AppStore图标到用户Dock上