Net user problems

  • Thread starter Thread starter William Hymen
  • Start date Start date
W

William Hymen

I am developing a wndows shell script to automate
user creation on a 2 node active directory domain.
The NET USER command does not populate the Full Name
"firstname lastname" correctly (column 1 in mmc plugin).
Also, the User Comment does not show up
in the gui either.

Is there vbscript solution to this problem?

Thanks in advance.

Bill
 
You could use cusrmgr.exe to set the values.

CUsrMgr Ver 1.0 Jan98 by G.Zanzen (c) MCS Central Europe
Sets a random password to a user
usage: -u UserName [-m \\MachineName] \\ default
LocalMachine
Resetting Password Function
-p Set to a random password
-P xxx Sets password to xxx
User Functions
-r xxx Renames user to xxx
-d xxx deletes user xxx
Group Functions
-rlg xxx yyy Renames local group xxx to yyy
-rgg xxx yyy Renames global group xxx to yyy
-alg xxx Add user (-u UserName) to local group xxx
-agg xxx Add user (-u UserName) to global group xxx
-dlg xxx deletes user (-u UserName) from local
group xxx
-dgg xxx deletes user (-u UserName) from global
group xxx
SetProperties Functions
-c xxx sets Comment to xxx
-f xxx sets Full Name to xxx
-U xxx sets UserProfile to xxx
-n xxx sets LogonScript to xxx
-h xxx sets HomeDir to xxx

-H x sets HomeDirDrive to x

+s xxxx sets property xxxx
-s xxxx resets property xxxx
where xxxx can be any of the following properties:
MustChangePassword
CanNotChangePassword
PasswordNeverExpires
AccountDisabled
AccountLockout
RASUser
returns 0 on success
 
Back
Top