Add to Group Script

  • Thread starter Thread starter Kdog
  • Start date Start date
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.
 
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
 
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
 
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
 
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
 
Back
Top