Re: Group Policy questions
- From: "Carl O" <carlo@xxxxxxxxxxxxxx>
- Date: Tue, 26 Jul 2005 19:24:19 GMT
Thanks that worked sortof. I am trying to get usernames to be added to
powerusers local group. I didnt want to use groups, but I figured I'd try
using domain users as all the users are part of that. Unfortuneatly, this
will not work as a logon script as when run twice, it throws up a windows
scripting error telling me that the group already exsists with those
premissions. Are you able to pass a -quiet or -ignore errors command to
windows scripting so that it will supress the error message?
i wish to use it in the logon script area but if it throws up errors that
isnt good.
"VMM" <VMM@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C5CCF991-4434-459B-A234-C5F01E4404B3@xxxxxxxxxxxxxxxx
> Hi Carl O,
>
> Sorry Carl, my mistake for not add any comments in code.
>
> Assume the follwing cenario:
>
> Domain name = XPTO
> Domain Global Security Group = ITTechnicians
>
> Purpose = add ITTechnicians Domain Group to Administrators Local Group
> '-------------------------------------------------------------
> Set wshNetwork = CreateObject("WScript.Network")
> ComputerName= wshNetwork.ComputerName
>
> localstr="WinNT://" & Computername
>
> 'Get domain group and assigned to ITTechs Variable
> ITTechs="WinNT://XPTO/ITTechnicians"
>
> 'Add Domain Group to Administrators Local Group
> AddToGroup ITTechs, "Administrators"
>
> Function AddToGroup(member, Grpname)
>
> Dim grp1
> Set grp1 = Getobject(localstr&"/"& Grpname,group)
> grp1.Add (member)
>
> End Function
> '-------------------------------------------------------------
>
> Please let me know if you have some questions.
>
> Regards,
.
- Follow-Ups:
- Re: Group Policy questions
- From: Carl O
- Re: Group Policy questions
- References:
- Group Policy questions
- From: Dave Fitton
- RE: Group Policy questions
- From: VMM
- Re: Group Policy questions
- From: Carl O
- Re: Group Policy questions
- From: VMM
- Re: Group Policy questions
- From: Carl O
- Re: Group Policy questions
- From: VMM
- Group Policy questions
- Prev by Date: MS Administrative Template not working
- Next by Date: Group Policy Results on W2K machines
- Previous by thread: Re: Group Policy questions
- Next by thread: Re: Group Policy questions
- Index(es):
Relevant Pages
|