Link to home
Start Free TrialLog in
Avatar of Glen A.
Glen A.Flag for United States of America

asked on

Help! Need to Add user or global group to workstation's local group

OK, I can find examples of how to use NetGroupAddUser to add a user to a global group on our NT Domain, but what I need to do is be able to add a user or global group to the local group on a workstation. . .

To make a long story short,  We've restructured our organization and added a new support group, and created a new Global Group for them in our NT Domain.  Now we want to add that global group into the Administrator's group on the 700 workstations this new group supports, so those I.T. staff can support the workstations properly.  *Note, Windows 2000 and NT4 workstations both.

I've re-worked an existing app of mine to show each workstation in the domains they support, and list the members of the administrators group.  This was so we could determine which machines had and didn't have that group in Administrators.  I'm running this app from my administrative workstation.  I want to be able to implement code to add the new group to the remote computer with a click of a button, so if some code examples could be provided that allow me to choose a remote computer (ie: \\servername) instead of just local.  

I really don't want to have to visit 700 machines individually . . .

Any help appreciated, thanks all!
ASKER CERTIFIED SOLUTION
Avatar of vinnyd79
vinnyd79

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Glen A.

ASKER

Found what I needed after pouring through LOTS of code, and modifying it for my purposes.

Lots of code, lol.

Amazingly enough I thought I looked at the vbadmincode page, as well as the other ones I frequent.  Not sure how I missed it . . .

that Wks project is fairly large.  Slow as a dog in our agency, mine is much faster although not as detailed.

Thanks for the help,
Avatar of Pranav0981
Pranav0981

Hi vinnyd79

Even i am searching for the same code.

The Link does not open is it the correct code.
http://www.vbadmincode.btinternet.co.uk/
Can you mail me the code.

Thanks & Regards

Pranav Parab