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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: