Re: adding a global group to the local administrators through a group policy

From: Chriss3 (noSpamHere_at_chrisse.se)
Date: 02/03/04


Date: Tue, 3 Feb 2004 10:21:08 +0100

Assign the follow script as an Logon Script within a Group Policy, i hope
that helps. Members in your Global Group "Your Global Group" will be added
to the local administrators group during logon.

Dim net, DomainString, UserString, UserObj

set net = Wscript.CreateObject("Wscript.Network")

strComputer = "."
DomainString = net.UserDomain
UserString = net.UserName

Set objDomainUser = GetObject("WinNT://" & DomainString & "/" & UserString)

For Each ObjGroup In UserObj.Groups
   Select Case GroupObj.Name

   Case "Your Global Group"

 Set objLocalGroup = GetObject("WinNT://" & strComputer &
"/Administrators,group")
 objGroup.Add(objDomainUser.ADsPath)

   End Select
Next

-- 
Regards,
Christoffer Andersson
No email replies please - reply in the newsgroup
If the information was help full, you can let me know at:
http://www.itsystem.se/employers.asp?ID=1
"Xavier" <xdepoorter_removespam@hotmail.com> skrev i meddelandet
news:%23MaAGGj6DHA.1968@TK2MSFTNGP11.phx.gbl...
> Situation:
>
> our PC's have all a local administrators group which contains different
> specified users (depending on the users who will use the PC).
>
> Now we want to add one global group to the local administrators group
> through a group policy *without* overwriting the current content of the
> local administrators group (just add the group to the existing content).
I
> don't succeed in it, so could someone help me out?
>
> TIA,
>
> Xavier
>
>


Relevant Pages

  • Re: Local Group added to local Administrators group
    ... Create a global group and add that to the local administrators group on the ... computers that you want this to happen to. ... > added with Group Policy to the local Administrators group. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: How to include a "Power Users" group to be include in a GPO
    ... However if this Group Policy is going to be ... create a domain global group and add users that ... >> How can I to create a group that evolves the local Power Users groups from ... >> Juan Villegas Azuaje ...
    (microsoft.public.windows.server.security)
  • Re: Disabling Interactive Login
    ... Create the global group you want to deny access to, ... via Group Policy at the domain or OU level. ... >> modify user rights for logon locally or deny logon locally. ... >> right via Group Policy to all computers in a domain or Organizational ...
    (microsoft.public.win2000.security)
  • Re: Group Policy for Terminal Server not working
    ... Windows 2000 TS server (for simplicity we'll call him TS-Server) ... Created a Global group TS-Users which consists of users from ... Created and linked a Group Policy object in TSOU ...
    (microsoft.public.win2000.group_policy)
  • Re: Restrict user to only certain machines.
    ... You can use the user rights for logon locally or deny logon locally to so ... Add the users to a global group and create an OU where you place their ... their OU create a Group Policy Object and configure the deny logon locally ... allow them to only logon to computers in their OU. ...
    (microsoft.public.win2000.group_policy)