Local user added to local group on all computers

  • Thread starter Thread starter jayloveroni
  • Start date Start date
J

jayloveroni

I saw a post to add domain users to a domain group:

for /f %q in (addthesenames.txt) do (net group groupname %
q /add /domain)

But I want to write a script that will pull computernames
from a text file, and add a local user from said computers
to the said computers' Administrators group. All the
computers have the same local user.

Thanks in advance.

jjs
 
for /f %q in (addthesenames.txt) do (net group groupname %
q /add /domain)

But I want to write a script that will pull computernames
from a text file, and add a local user from said computers
to the said computers' Administrators group. All the
computers have the same local user.

for /f %q in (addthesecomputers.txt) do psexec \\%q net localgroup
administrators username /add

PSEXEC will be found in PSTOOLS from www.sysinternals.com

Computers must be up and running server service, which is default
configuration. The command must be executed by a user with admin
rights on the target computers.

Ciao, Walter
 
Thanks,

I will give it a try.

jjs
-----Original Message-----

for /f %q in (addthesecomputers.txt) do psexec \\%q net localgroup
administrators username /add

PSEXEC will be found in PSTOOLS from www.sysinternals.com

Computers must be up and running server service, which is default
configuration. The command must be executed by a user with admin
rights on the target computers.

Ciao, Walter
.
 
Back
Top