PC Review Forums Newsgroups Windows 2000 Microsoft Windows 2000 CMD Promt Local user added to local group on all computers

Reply

Local user added to local group on all computers

 
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average.
Old 01-10-2003, 05:53 PM   #1
jayloveroni
Guest
 
Posts: n/a
Default Local user added to local group on all computers


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
  Reply With Quote
Old 01-10-2003, 07:36 PM   #2
Walter Schulz
Guest
 
Posts: n/a
Default Re: Local user added to local group on all computers

>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
  Reply With Quote
Old 01-10-2003, 10:55 PM   #3
jayloveroni
Guest
 
Posts: n/a
Default Re: Local user added to local group on all computers

Thanks,

I will give it a try.

jjs
>-----Original Message-----
>>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
>.
>

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off