Win32_LogonSession

Struct Win32_LogonSession 

Source
pub struct Win32_LogonSession {
    pub Caption: Option<String>,
    pub Description: Option<String>,
    pub InstallDate: Option<WMIDateTime>,
    pub Name: Option<String>,
    pub Status: Option<String>,
    pub StartTime: Option<WMIDateTime>,
    pub AuthenticationPackage: Option<String>,
    pub LogonId: Option<String>,
    pub LogonType: Option<u32>,
}
Expand description

The Win32_LogonSession WMI class describes the logon session or sessions associated with a user logged on to a computer system running Windows.

https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-logonsession

Fields§

§Caption: Option<String>

A short textual description of the object.

§Description: Option<String>

A textual description of the object.

§InstallDate: Option<WMIDateTime>

Indicates when the object was installed. Lack of a value does not indicate that the object is not installed.

§Name: Option<String>

Label by which the object is known. When subclassed, this property can be overridden to be a key property.

§Status: Option<String>

String that indicates the current status of the object. Operational and non-operational status can be defined. Operational status can include “OK”, “Degraded”, and “Pred Fail”. “Pred Fail” indicates that an element is functioning properly, but is predicting a failure (for example, a SMART-enabled hard disk drive).

Non-operational status can include “Error”, “Starting”, “Stopping”, and “Service”. “Service” can apply during disk mirror-re-silvering, reloading a user permissions list, or other administrative work. Not all such work is online, but the managed element is neither “OK” nor in one of the other states.

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”)
§StartTime: Option<WMIDateTime>

Time at which the session started.

§AuthenticationPackage: Option<String>

Name of the subsystem used to authenticate the logon session.

§LogonId: Option<String>

ID assigned to the logon session.

§LogonType: Option<u32>

Numeric value that indicates the type of logon session.

  • 0: Used only by the System account.
  • Interactive (2): Intended for users who are interactively using the machine, such as a user being logged on by a terminal server, remote shell, or similar process.
  • Network (3): Intended for high-performance servers to authenticate clear text passwords. LogonUser does not cache credentials for this logon type.
  • Batch (4): Intended for batch servers, where processes can be executed on behalf of a user without their direct intervention; or for higher performance servers that process many clear-text authentication attempts at a time, such as mail or web servers. LogonUser does not cache credentials for this logon type.
  • Service (5): Indicates a service-type logon. The account provided must have the service privilege enabled.
  • Proxy (6): Indicates a proxy-type logon.
  • Unlock (7): This logon type is intended for GINA DLLs logging on users who are interactively using the machine. This logon type allows a unique audit record to be generated that shows when the workstation was unlocked.
  • NetworkCleartext (8): Preserves the name and password in the authentication packages, allowing the server to make connections to other network servers while impersonating the client. This allows a server to accept clear text credentials from a client, call LogonUser, verify that the user can access the system across the network, and still communicate with other servers.
  • NewCredentials (9): Allows the caller to clone its current token and specify new credentials for outbound connections. The new logon session has the same local identify, but uses different credentials for other network connections.
  • RemoteInteractive (10): Terminal Services session that is both remote and interactive.
  • CachedInteractive (11): Attempt cached credentials without accessing the network.
  • CachedRemoteInteractive (12): Same as RemoteInteractive. This is used for internal auditing.
  • CachedUnlock (13): Workstation logon.

Trait Implementations§

Source§

impl Clone for Win32_LogonSession

Source§

fn clone(&self) -> Win32_LogonSession

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_LogonSession

Source§

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

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

impl Default for Win32_LogonSession

Source§

fn default() -> Win32_LogonSession

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

impl<'de> Deserialize<'de> for Win32_LogonSession

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_LogonSession

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>,