Help with my WMI

julian

Distinguished
Apr 18, 2004
153
0
18,680
Archived from groups: microsoft.public.win2000.group_policy (More info?)

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
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.group_policy (More info?)

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
>
 

TRENDING THREADS