Skip to content

UsrMgr_SetLocalUserProperties

Sets or changes a users account properties.

UsrMgr_SetLocalUserProperties(sUserName, bNoPasswordChange, bNoPasswordExpire, bChangePasswordAtNextLogin, sAccountExpireDate, sLoginScript) As Boolean

The name of the user, the user must exist

Set or unset User cannot change password

Set or unset Password never expires

The user has to change the password at next login

The date the account expires. The sAccountExpireDate should be a valid date in the future. Specify ‘Never’ if the account should never expire

Specifies the login script the user should execute

'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 example
If bStatus Then bStatus = UsrMgr_SetLocalUserProperties("Username", True, True, False, DateAdd("yyyy", 5, Now), "")

Scripting Guidelines

UsrMgr_CreateLocalGroup UsrMgr_AddUserToLocalGroup Constants Package Property Variables