Re: Add global security group to local administrators group
Joshua C. Clark wrote:
I am having a heck of a time here, all I want to do is add this global
security group to my local administrator group on my Windows 2000 / XP
machines, any ideas, as always thanks in advance..
corporate.libgo/IS/IS Departments/875-HelpDesk/Groups & Contacts/Helpdesk SG
I was trying to manipulate the MS code, but this is for local users I take
it;
(snip)
Hi,
The script below puts the domain group DesktopAdmins into the
Administrators group.
'--------------------8<----------------------
Set oWshNet = CreateObject("WScript.Network")
sDomainGroup = "DesktopAdmins"
sNetBIOSDomain = oWshNet.UserDomain
sComputer = oWshNet.ComputerName
Set oLocalGroup = GetObject("WinNT://" & sComputer & "/Administrators,group")
Set oDomainGroup = GetObject("WinNT://" & sNetBIOSDomain & "/" _
& sDomainGroup & ",group")
' suppress errors in case group is already a member
On Error Resume Next
oLocalGroup.Add(oDomainGroup.ADsPath)
On Error Goto 0
'--------------------8<----------------------
If the computers are in another domain than the group you want to add,
you will need to hard code the domain name the group belongs to in the
variable "sNetBIOSDomain".
--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx
.
Relevant Pages
- Re: Listing Users that are Part of the Local Administrator Group
... I have an active directory 2003 domain environment and basically want to be able to generate a text file that lists the computers in my domain with the Domain users that belong to those computers' local Administrator group. ... Very new to Windows scripting, and I can't figure out how to pull the users from the local administrator group. ... fOutFile.WriteLine vbCrlF & "Other accounts:" fOutFile.WriteLine sOthers fOutFile.Close ... (microsoft.public.scripting.vbscript) - Re: script to add a user to the local administrators group
... > add a single user to the local administrator group? ... the user belongs to in the variable "sNetBIOSDomain". ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ... (microsoft.public.scripting.vbscript) - Re: script to check username rights on local machine
... > to see if any usersnames are in the local administrator group can ... Assuming you have a Active Directory domain, ... Const OpenAsASCII = 0 ... torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ... (microsoft.public.scripting.vbscript) - Re: Escalation of privilege
... Temporary Administrator group memberships ... run a process under a non-privileged user account, ... Microsoft MVP Scripting and WMI, ... (microsoft.public.security) - Limit domain login to Administrator Group
... winxp computers as part of the domain. ... each user is a part of their local administrator group on ... localuser2 can not login ... (microsoft.public.win2000.group_policy) |
|