Win32_UserAccount

Struct Win32_UserAccount 

Source
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

Source§

fn clone(&self) -> Win32_UserAccount

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Win32_UserAccount

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Win32_UserAccount

Source§

fn default() -> Win32_UserAccount

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Win32_UserAccount

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Win32_UserAccount

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,