Adding users to the local admins group with bat script

Just wonderin if this will do the above, and if you think its advisable.

net localgroup Administrators %username% /ADD >NUL
LVL 3
Dinga84Asked:
Who is Participating?
 
Jeffrey Kane - TechSoEasyPrincipal ConsultantCommented:
Well, it won't unless you run it from the machine you want to add them to... but you can actually just add a user by using the Server Management Console > Computers > Manage Computer

Also, when you join a workstation to the network with the correct method (http://<servername>/connectcomputer) it will ask you what user to assign to that computer and will automatically make that user a member of the local administrators group.

I personally don't have a problem with this, and it makes for easier management.  However, you do need to enforce software restrictions in order to keep users from installing stuff that you don't want them to.

Jeff
TechSoEasy
0
 
Dinga84Author Commented:
Jeff,

Was planning on running it from a bat file, however didnt realise that the connectcomputer wizard assigned them as a member of local admin, that takes care of that for me anyway.

Thanks again.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.