Re: Help with my WMI

From: Ken B (none_at_microsoft.com)
Date: 02/07/05


Date: Mon, 7 Feb 2005 11:15:29 -0500

You could use the "Restricted Groups" policy to add members to a "Restricted
Group"

Look in: Computer Config> Windows Settings> Security Settings> Restricted
Groups.

If you don't have one of the patches installed (sorry, don't have the number
or link off hand), the policy is replacing whatever the computer had for the
restricted group members. If you did install the patch, then it is
additive. So don't forget to put "Domain Admins" and whatever else you
wanted in that policy.

"Julian" <Julian@discussions.microsoft.com> wrote in message
news:8414EF09-05ED-4DDB-88CB-758225D06BF0@microsoft.com...
> Hi,
> Moving forward with AD I am learning that I require the WMI skill to take
> full advantage of GPO's.
> I would like my script to Add a specified group to the pc's Local Admin
> account.
> My script won't run and has no form on debugging.
> I modified the script to suite my requirements.
> Pls can someone check it out and provide some input
> Thanx in advance ,
> Julian
> 'Beginning Of the Script
>
> On Error Resume Next
>
> 'get main objects/variables
> Set ws = WScript.CreateObject ( "WScript.Shell" )
> compname = ws.ExpandEnvironmentStrings ( "%COMPUTERNAME%" )
> Set adGrp = GetObject ( "WinNT://" & compname & "/Administrators,group" )
>
> 'add domain groups to local admin group
> adGrp.Add ( "WinNT://coronation/Desktop Admins,group" )
>
> 'End of the Script
>



Relevant Pages

  • Re: Restricted Groups GPO
    ... The startup script could add the required groups to the local admin group on ... I've only used it to stipulate> what domain groups are members or what local groups - I didn't care that> nobody else could be a member;-) ... > I need to use the Restricted Groups policy setting to enforce> membership in the local Administrators group on member servers and> workstations by certain global groups ...
    (microsoft.public.windows.server.active_directory)
  • Re: problem with "Restricted Groups" within a GPO linked to my domain.
    ... Restricted Groups does not prevent a user that can add members to a RG from ... What RG will do however is to enforce membership of the RG at the ... > Groups" for a policy (that policy being linked to the domain, ...
    (microsoft.public.security)
  • Re: Giving only read access to all of AD to a domain admin
    ... enforced with Group Policy or script. ... up with this group in the Administrators group. ... Restricted Groups enforced with Group Policy ... members but aren't listed in the policy are removed). ...
    (microsoft.public.windows.server.active_directory)
  • Re: local admin-rights
    ... Group Policy with restricted groups should do the trick. ... local administrators group. ... added members each time the policy is reapplied. ...
    (microsoft.public.win2000.security)
  • Re: scripted logon
    ... Why can't you launch all the scripts from a Group Policy based Logon script. ... Here's the policy settings (I sure hope word wrap doesn't mess it up too ... Windows Components/Windows Installer ...
    (microsoft.public.windows.terminal_services)