PDA

View Full Version : Creating Local user accounts (WXP-Pro)


kresler
02-10-2006, 06:17 AM
I need to create local workstation user accounts on machines that do not belong to a domain. Is their a way to do this with WSH, WMI, or Vbscript with out using a command line utility?

If no can I use Vbscript to pass user input to a variable that the cusrmgr.exe utility can use?

Thanks
County IT

motoflop
02-10-2006, 01:11 PM
Users can be added with command "net user /add" command. Type "net user /help" to see whole syntax. With utillity program psexec (from www.sysinternals.com) you could create bat file, which does the job. Something like this:

@echo off
psexec \\computer1 -u administrator -p pwd1 net user newuser1 pwdxxx /add
psexec \\computer2 -u administrator -p pwd2 net user newuser2 pwdyyy /add