General discussion

Locked

Login Script

By darts32 ·
I need a login script to add a group to the local administrators group on PC's. I want it to work when users login to the PC and save the visit to each PC manually.

I know this can be done through the global policy but it might interfere with other things that we have in place already.

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by lowlands In reply to Login Script

Create a vbscript with some like this:

On Error Resume Next
'===============================================================================
'Add Workstation Administration Group to Local Administrators
'================================================strComputer = "."
Set objLocalGroup = GetObject("WinNT://" & strComputer & "/Administrators,group")
Set objADGroup = GetObject("WinNT://<domain>/<domain group you want to add>,group")
objLocalGroup.Add(objADGroup.ADsPath)
'================================================
wscript.Quit

You can add this to the domain login script with a GPO. I am not sure I understand the interference part.

Collapse -

by darts32 In reply to

Poster rated this answer.

Collapse -

by darts32 In reply to Login Script

Lowlands, we have to create an OU, set a local policy, don?t want to do it because global policy will not apply to those, that might cause issues.

Collapse -

by lowlands In reply to Login Script

If you have a list of all the PC's, you could manually copy the script to the PC's. Then either add it to the startup folder, or maybe even set a runonce registry setting.
The problem with this would be that you'd have to keep doing this as workstations get added to your domain.

Collapse -

by darts32 In reply to

I have a list of current PC's but want this to happen without going in each PC.

Collapse -

by darts32 In reply to Login Script

Point value changed by question poster.

Collapse -

by darts32 In reply to Login Script

This question was closed by the author

Back to Networks Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums