Date (With /expires: Computer Names
Date (With /expires: Computer Names
Item Explanation
Use this switch to active or deactivate the specified useraccount. If you
/active:{yes | no}
don't use the /active option, the net user assumes yes.
Use this option to enter a description of the account. A maximum of 48
characters is allowed. The text entered using the /comment switch is
/comment:"text"
viewable in the Description field in a user's profile in Users and Groups in
Windows.
This switch is used to set a country code for the user, which determines
/countrycode:nnn the language used for error and help messages. If the /countrycode switch
isn't used, the computer's default country code is used: 000.
The /expires switch is used to set a specific date (see below) in which the
/expires:{date | never} account, not the password, should expire. If the /expires switch isn't used,
never is assumed.
If you choose to specify a date then it must be in mm/dd/yy or mm/dd/yyyy
date (with /expires
format, months and days as numbers, fully spelled out, or abbreviated to
only)
three letters.
Use the /fullname switch to specify the real name of the person using the
/fullname:"name"
username account.
Set a pathname with the /homedir switch if you want a home directory
/homedir:pathname
other than the default2.
/passwordchg:{yes | This option specifies whether this user can change his or her own
no} password. If /passwordchg is not used, the net user assumes yes.
/passwordreq:{yes | This option specifies whether this user is required to have a password at
no} all. If this switch isn't used, yes is assumed.
This switch forces the user to change his or her password at the next
/logonpasswordchg:
logon. Net user assumes no if you don't use this option. The
{yes | no}
/logonpasswordchg switch is not available in Windows XP.
/profilepath:pathname This option sets a pathname for the user's logon profile.
/scriptpath:pathname This option sets a pathname for the user's logon script.
Use this switch to specify a timeframe (see below) that the user can log
on. If you don't use /times then net user assumes that all times are okay. If
/times:[timeframe | all]
you do use this switch, but don't specify either timeframe or all, then net
user assumes that no times are okay and the user is not allowed to log on.
If you choose to specify a timeframe you must do so in a particular way.
Days of the week must be spelled out completely or abbreviated in
timeframe (with /times MTWThFSaSu format. Times of day can be in a 24-hour format, or 12-
only) hour format using AM and PM or A.M. and P.M. Periods of time should
use dashes, day and time should be separated by commas and day/time
groups by semicolons.
/usercomment:"text" This switch adds or changes the User Comment for the specified account.
Use this option to specify the computer names of up to eight computers
/workstations: that the user is allowed to log on to. This switch is really only useful when
{computername[,...] | *} used with /domain. If you don't use /workstations to specify allowed
computers then all computers (*) is assumed.