Skip to content

UserInfo

A snapshot of a Windows user account's mutable state.

Returned by User.info, User.update and users. Passwords are write-only and never appear in a snapshot.

Fields

account_expires @ (time.DateTime | nil)

Account expiration, or nil when the account never expires.

bad_password_count @ Int

Recorded failed password attempts.

comment @ (Str | nil)

Administrative account comment.

disabled @ Bool

Whether the account is disabled.

flags @ UserFlags

Complete native account flags.

full_name @ (Str | nil)

Display name.

home_dir @ (fs.Path | nil)

Home directory.

home_dir_drive @ (Str | nil)

Drive designator assigned to the home directory at logon, such as "Z:".

last_logon @ (time.DateTime | nil)

Last recorded logon.

logon_count @ Int

Recorded successful logons.

name @ Str

Account name.

password_age @ time.Duration

Time since the password was last changed.

password_cannot_change @ Bool

Whether the user may change the password.

password_expired @ Bool

Whether the password has expired.

password_never_expires @ Bool

Whether the password is exempt from expiry.

profile @ (fs.Path | nil)

Profile path.

script_path @ (fs.Path | nil)

Logon script path.

sid @ security.windows.Sid

The account's SID.

user_comment @ (Str | nil)

User-facing account comment.