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. Reasons below:

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.

Cannot visit each PC because of remote sites.

This conversation is currently closed to new comments.

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

All Comments

Collapse -

by jtakiwi In reply to Login Script

To add a domain security group called "workstation admins" for example to the local administrators group on a member pc, add these lines to your logon batch file:

net localgroup Administrators | find /i "your domain name\workstation admins" > nul

if not %errorlevel%==0 (net localgroup Administrators "your domain name\workstation admins" /ADD > nul)

Remember to replace "your domain name" with your actual domain name. Note, Quotes only required where spaces are involved.

Collapse -

by darts32 In reply to

Access was denied. I need the script to run under the users login.

Collapse -

by darts32 In reply to Login Script

jtakiwi, I inserted a pause after the code ran that you provided. Access was denied when the batch file ran under the users name.

Collapse -

by BFilmFan In reply to Login Script

I say forget running the network and jtakiwi can take us fishing at Lake Eufala.

Then we can sit in the boat, have drinks and lie about the bass we ain't catchin'...

Collapse -

by darts32 In reply to

Sounds like a good idea to me.

Collapse -

by darts32 In reply to Login Script

This question was closed by the author

Back to Security Forum
6 total posts (Page 1 of 1)  

Related Discussions

Related Forums