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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add new users with vbscript to wind

Status
Not open for further replies.

pytchley

Technical User
Jan 20, 2003
123
GB
Add new users with vbscript to windows XP pro pc's
I am trying to add new users with a vbscript but can only find scripts for active directory - any ideas
 
pytchley,

Use the WScript.Run to launch the NET.exe command with the parameters:

to add to PC:
Code:
user someguy somepassword /ADD
Use * in place of somepassword to be prompted for a password.

to delete from PC:
Code:
user someguy /DEL

To add to group:
Code:
localgroup Administrators someguy /ADD

To remove from group:
Code:
localgroup Administrators someguy /DELETE

Sometimes the old ways are the best.

HtH,

Rob
robschultz@yahoo.com
-Focus on the solution to the problem, not the obstacles in the way.-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top