User Account Password Age

To Change the Minimum Password Age
net accounts /minpwage:(0-998)


To Change the Maximum Password Age –
(how long the user can use the password)
net accounts /maxpwage:(1-999)


To Disable Password Expiration for All Users

net accounts /maxpwage:unlimited


For my reference

net accounts [/forcelogoff:{minutes | no}] [/minpwlen:length] [/maxpwage:{days | unlimited}] [/minpwage:days] [/uniquepw:number] [/domain]


Parameters

/forcelogoff: { minutes | no } : Sets the number of minutes to wait before ending a user’s session with a server when the user account or valid logon time expires. The default value, no, prevents users from being forced to log off.

/minpwlen: length : Sets the minimum number of characters for a user account password. The range is from 0 through 127 characters and the default is six characters.

/maxpwage: { days | unlimited } : Sets the maximum number of days that a user account’s password is valid. The unlimited value sets no maximum time. The /maxpwage command-line option must be greater than /minpwage. The range is from 1 through 49,710 days (that is, unlimited equals 49,710 days), and the default value is 90 days.

/minpwage: days : Sets the minimum number of days before a user can change a new password. The default value is zero days, which sets no minimum time. The range is from 0 through 49,710 days.

/uniquepw: number : Requires a user to not repeat the same password for the specified number of password changes. The range is from 0 through 24 password changes, and the default is five password changes.


Examples

To display the current settings, the password requirements, and the server role for a server, type:

net accounts

 

To set a minimum of seven characters for user account passwords, type:

net accounts /minpwlen:7

 

To specify that users can reuse a password only after the fifth time they change passwords, type:

net accounts /uniquepw:5

 

To prevent users from changing passwords more often than every seven days, force users to change passwords every 30 days, and force users to log off after the logon time expires with a five-minute warning, type:

net accounts /minpwage:7 /maxpwage:30 /forcelogoff:5

 

To ensure that the preceding settings take effect for the domain that the computer is logged on to, type:

net accounts /minpwage:7 /maxpwage:30 /domain

email me