I am trying to create a script that will create new user accounts on new systems that we install and put them in the respective permission groups. I have managed to add users to the ‘administrators’ group and remove them from the ‘users’ group but I am having some trouble when it comes to adding users to the ‘Power Users’ and ‘Remote Desktop Users’ groups. The script so far is as follows:
net user User1 User1 /add
net user User2 User2 /add
net localgroup administrators User2 /add
net localgroup powerusers User1 /add
net localgroup users Users2 /delete
Every thing bar the 4th line of the script is executing fine I have try’d the following lines to replace the 4th line and had no luck the lines are as follows:
net localgroup power_users user1 /add
net localgroup power%20%users user1 /add
Any help on this matter would be appreciated.
Try