pub struct Win32_UserAccount {Show 16 fields
pub AccountType: Option<u32>,
pub Caption: Option<String>,
pub Description: Option<String>,
pub Disabled: Option<bool>,
pub Domain: Option<String>,
pub FullName: Option<String>,
pub InstallDate: Option<WMIDateTime>,
pub LocalAccount: Option<bool>,
pub Lockout: Option<bool>,
pub Name: Option<String>,
pub PasswordChangeable: Option<bool>,
pub PasswordExpires: Option<bool>,
pub PasswordRequired: Option<bool>,
pub SID: Option<String>,
pub SIDType: Option<u8>,
pub Status: Option<String>,
}Expand description
The Win32_UserAccount WMI class contains information about a user account on a computer system
running Windows.
Note: Because both the Name and Domain are key properties, enumerating Win32_UserAccount on a large network can negatively affect performance. Calling GetObject or querying for a specific instance has less impact.
https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-useraccount
Fields§
§AccountType: Option<u32>Flags that describe the characteristics of a Windows user account.
-
Temporary duplicate account (256): UF_TEMP_DUPLICATE_ACCOUNT: Local user account for users who have a primary account in another domain. This account provides user access to this domain only—not to any domain that trusts this domain.
-
Normal account (512): UF_NORMAL_ACCOUNT: Default account type that represents a typical user.
-
Interdomain trust account (2048): UF_INTERDOMAIN_TRUST_ACCOUNT: Account for a system domain that trusts other domains.
-
Workstation trust account (4096): UF_WORKSTATION_TRUST_ACCOUNT: Computer account for a computer system running Windows that is a member of this domain.
-
Server trust account (8192): UF_SERVER_TRUST_ACCOUNT: Account for a system backup domain controller that is a member of this domain.
Caption: Option<String>Domain and username of the account.
Description: Option<String>Description of the account.
Disabled: Option<bool>Windows user account is disabled.
Domain: Option<String>Name of the Windows domain to which a user account belongs, for example: “NA-SALES”.
FullName: Option<String>Full name of a local user, for example: “Dan Wilson”.
InstallDate: Option<WMIDateTime>Date the object is installed. This property does not need a value to indicate that the object is installed.
LocalAccount: Option<bool>If true, the account is defined on the local computer.
Lockout: Option<bool>If true, the user account is locked out of the Windows operating system.
Name: Option<String>Name of the Windows user account on the domain that the Domain property of this class specifies.
Example: “danwilson”.
PasswordChangeable: Option<bool>If true, the password on this user account can be changed.
PasswordExpires: Option<bool>If true, the password on this user account expires.
PasswordRequired: Option<bool>If true, a password is required on a Windows user account. If false, this account does not require a password.
SID: Option<String>Security identifier (SID) for this account. A SID is a string value of variable length that is used to identify a trustee. Each account has a unique SID that an authority, such as a Windows domain, issues. The SID is stored in the security database. When a user logs on, the system retrieves the user SID from the database, places the SID in the user access token, and then uses the SID in the user access token to identify the user in all subsequent interactions with Windows security. Each SID is a unique identifier for a user or group, and a different user or group cannot have the same SID.
SIDType: Option<u8>Enumerated value that specifies the type of SID.
- SidTypeUser (1)
- SidTypeGroup (2)
- SidTypeDomain (3)
- SidTypeAlias (4)
- SidTypeWellKnownGroup (5)
- SidTypeDeletedAccount (6)
- SidTypeInvalid (7)
- SidTypeUnknown (8)
- SidTypeComputer (9)
Status: Option<String>Current status of an object. Various operational and nonoperational statuses can be defined. Operational statuses include: “OK”, “Degraded”, and “Pred Fail”, which is an element such as a SMART-enabled hard disk drive that may be functioning properly, but predicts a failure in the near future. Nonoperational statuses include: “Error”, “Starting”, “Stopping”, and “Service”, which can apply during mirror re-silvering of a disk, reloading a user permissions list, or other administrative work.
Values include the following:
- OK (“OK”)
- Error (“Error”)
- Degraded (“Degraded”)
- Unknown (“Unknown”)
- Pred Fail (“Pred Fail”)
- Starting (“Starting”)
- Stopping (“Stopping”)
- Service (“Service”)
- Stressed (“Stressed”)
- NonRecover (“NonRecover”)
- No Contact (“No Contact”)
- Lost Comm (“Lost Comm”)
Trait Implementations§
Source§impl Clone for Win32_UserAccount
impl Clone for Win32_UserAccount
Source§fn clone(&self) -> Win32_UserAccount
fn clone(&self) -> Win32_UserAccount
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more