Script To Create Multiple Local User Accounts with Specific Settings Windows Server 2003

3.9k Views Asked by At

I need to create 80 local user accounts with the following information/settings:

  1. Username
  2. Full name
  3. Description (will be the same for all users)
  4. Password
  5. Member of Group "Web Reporting Users (Cust)"
  6. Uncheck "Connect client drives,printers at logon" and "Default to main client computer"

The following script works on my server, but it only creates the username/password. I need to modify it to add the other information. Even if you could provide a way to set the group membership that would be very helpful.

strComputer = "SERVER.DOMAIN.com" 
Set colAccounts = GetObject("WinNT://" & strComputer & "") 
Set objUser = colAccounts.Create("user", "TestingScript") 
objUser.SetPassword "09iu%4et" 
objUser.SetInfo

Any help would be appreciated :)

EDIT: I made some progress. I can now run the script and have it create a user with password and correct group. However, I still need:

  1. Description
  2. Full name
  3. Uncheck "Connect client drives,printers at logon" and "Default to main client computer"

How can I add these to the script?

EDIT 2:

Made even more progress, but I still need to uncheck:

Uncheck "Connect client drives,printers at logon" and "Default to main client computer"

This is the last step so hopefully someone knows! :)

0

There are 0 best solutions below