Add local users during task sequence OSD
Hi, How can I add local users during task sequence when deploying XP and Vista? Please advice. Brgsd,
November 28th, 2007 7:23pm

SportyMorty wrote: Hi, How can I add local users during task sequence when deploying XP and Vista? Please advice. Brgsd, Create a script such as the snippet below and use the "Run Command Line" task sequence action. Code Block ' From the book "Windows XP Cookbook" ' ISBN: 0596007256 ' ------ SCRIPT CONFIGURATION ------ strUserName = "<UserName>" ' e.g. rallen strFullName = "<FullName>" ' e.g. Robbie Allen strDescr = "<Description>" ' e.g. Employee account strPassword = "<Password>" strComputer = "<ComputerName>" ' ------ END CONFIGURATION --------- set objSystem = GetObject("WinNT://" & strComputer) set objUser = objSystem.Create("user", strUserName) objUser.FullName = strFullName objUser.Description = strDescr objUser.SetPassword strPassword objUser.SetInfo WScript.Echo objUser.Name & " created" Hope this helps! John P. Lang (SCCM) This posting is provided "AS IS" with no warranties, and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
November 28th, 2007 9:21pm

Hi John, And thanks for a swift reply. Where in the TS should I put the "Run Command Line" to execute this script? Thanks
November 28th, 2007 9:36pm

You would add this any time after the "Setup Windows and ConfigMgr" task sequence action, since it needs to run in the newly installed operating system. John This posting is provided "AS IS" with no warranties, and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
November 28th, 2007 9:50pm

I am trying using this script to add local user. It also displays that user is added under Windows 7 when I tested. But when I browse to users, the new user does not appear ?? Any Suggestions?
July 27th, 2011 6:21pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics