Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add user to local admin

Status
Not open for further replies.

edo74

Technical User
Oct 29, 2003
7
SK
Hello all,
is it possible to add a domain user (not an Active Direcory domain) to local administrators group by VBScript? I wouldn't like to use the "net localgroup" command.
thank you

Eduard
 
Hello edo74,

Can do something like this once you get hold all the exact adspath to identify the user & localgroup.
Code:
set oLocal=getobject("WinNT://computer/admin, group")
oLocal.add "WinNT://domain/fsmith, user"
regards - tsuji
 
Tsuji,

thanx a lot,
it works perfectly,

Eduard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top