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)
Section titled “sUserName (String)”The name of the user, the user must exist
bNoPasswordChange (Boolean)
Section titled “bNoPasswordChange (Boolean)”Set or unset User cannot change password
bNoPasswordExpire (Boolean)
Section titled “bNoPasswordExpire (Boolean)”Set or unset Password never expires
bChangePasswordAt (Boolean)
Section titled “bChangePasswordAt (Boolean)”The user has to change the password at next login
sAccountExpireDate (String)
Section titled “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)
Section titled “sLoginScript (String)”Specifies the login script the user should execute
Example
Section titled “Example”'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”UsrMgr_CreateLocalGroup UsrMgr_AddUserToLocalGroup Constants Package Property Variables