UsrMgr\_SetLocalUserProperties
Description
Section titled “Description”Sets or changes a users account properties.
Syntax
Section titled “Syntax”UsrMgr_SetLocalUserProperties(sUserName, bNoPasswordChange, bNoPasswordExpire, bChangePasswordAtNextLogin, sAccountExpireDate, sLoginScript) As Boolean
Parameters
Section titled “Parameters”sUserName (String)
The name of the user, the user must exist
bNoPasswordChange (Boolean)
Set or unset User cannot change password
bNoPasswordExpire (Boolean)
Set or unset Password never expires
bChangePasswordAt (Boolean)
The user has to change the password at next login
sAccountExpireDate (String)
The date the account expires. The sAccountExpireDate should be a valid date in the future. Specify ‘Never’ if the account should never expire
sLoginScript (String)
Specifies the login script the user should execute
Example
Section titled “Example”VBScript
'Sample 1:If bStatus Then bStatus = UsrMgr_SetLocalUserProperties("Username", False, False, True, "Never", "Login.cis")
'Sample 2: Note - DateAdd adds 5 years to current date in this exampleIf bStatus Then bStatus = UsrMgr_SetLocalUserProperties("Username", True, True, False, DateAdd("yyyy", 5, Now), "")Related functions
Section titled “Related functions”See Also
Section titled “See Also”UsrMgr_CreateLocalGroup UsrMgr_AddUserToLocalGroup