Thursday, June 20, 2013

Adding Domain user to local group on multiple computers

Want to add a user to a local group in multiple computers ? Try below steps.

Step 1. Copy Psexec.exe on your server. You can download it from here.

Step 2: Create Servers.txt in the same location where Psexex.exe resides and store the multiple computers IP.

Step 3 : Open Command prompt with Admin Privileges and change directory to where Psexec.exe resides.

Step 4: Execute below command now

Psexec.exe @servers.txt NET.exe LocalGroup Administrators domain\username /add 

Above example is for adding the user to Administrators group. If you need to add it to another group like Remote Desktop Users, enclose it within quotes.

Psexec.exe @servers.txt NET.exe LocalGroup “Remote Desktop Users” domain\username /add 

No comments:

Post a Comment