Add to Group Script

K

Kdog

I have to add 900 users to an existing global group in a single
domain. I'm a little confused as to how to work this with the
usernames pulled from a text file.

I recall something like this:

for(IN%%1(addthesenames.txt) net group %1 groupname /DOMAIN

Will this do it? Thanks.
 
R

Ray at

Your text file just looks like this?

user1
user2
user3
....

If so, try

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

Ray at work
 
K

Kdog

I forgot to thank you for your real quick reply. The code you gave me
worked fine. Thanks again. Is lane 34 in a bowling alley????
Mike Kallan
 
R

Ray at

He he. As a matter of fact, that is what the lane 34 refers to. I used to
always bowl in the same lane when I went bowling in the area where I used to
live. It was lane 34. :]

Ray at work
 
K

Kdog

So much for mysterious handles....

He he. As a matter of fact, that is what the lane 34 refers to. I used to
always bowl in the same lane when I went bowling in the area where I used to
live. It was lane 34. :]

Ray at work

Kdog said:
I forgot to thank you for your real quick reply. The code you gave me
worked fine. Thanks again. Is lane 34 in a bowling alley????
Mike Kallan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top