Click to Rate and Give Feedback
MSDN
MSDN Library
WMI Reference
WMI Classes
Win32 Classes
 Win32_Account Class
Win32_Account Class

The Win32_Account abstract WMI class contains information about user accounts and group accounts known to the computer system running Windows. User or group names recognized by a Windows NT domain are descendants (or members) of this class.

The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties. Properties are listed in alphabetic order, not MOF order.

Syntax

class Win32_Account : CIM_LogicalElement
{
  string   Caption;
  string   Description;
  string   Domain;
  datetime InstallDate;
  boolean  LocalAccount;
  string   Name;
  string   SID;
  uint8    SIDType;
  string   Status;
};

Methods

The Win32_Account class does not define any methods.

Properties

The Win32_Account class defines the following properties.

Caption
Data type: string
Access type: Read-only
Qualifiers: MaxLen(64)

Short description (one-line string) of the object. This property is inherited from the CIM_ManagedSystemElement class.

Description
Data type: string
Access type: Read-only

Description of the object. This property is inherited from the CIM_ManagedSystemElement class.

Domain
Data type: string
Access type: Read-only
Qualifiers: Key

Name of the Windows domain to which a group or user belongs.

Example: "NA-SALES"

InstallDate
Data type: datetime
Access type: Read-only

Date and time that the object was installed. This property does not require a value to indicate that the object is installed. This property is inherited from the CIM_ManagedSystemElement class.

LocalAccount
Data type: boolean
Access type: Read-only

If TRUE, the account is defined on the local machine. To retrieve only accounts defined on the local machine, design a query that includes the condition "LocalAccount=TRUE".

Windows 2000 and Windows NT 4.0 with SP4 and later:  This property is not available.
Name
Data type: string
Access type: Read-only
Qualifiers: Key

Name of the Windows system account on the domain specified by the Domain property of this class. This property overrides the Name property inherited from CIM_ManagedSystemElement.

SID
Data type: string
Access type: Read-only

Security identifier (SID) for this account. A SID is a string value of variable length used to identify a trustee. Each account has a unique SID issued by an authority (such as a Windows domain), stored in a security database. When a user logs on, the system retrieves the user's SID from the database and places it in the user's access token. The system uses the SID in the user's access token to identify the user in all subsequent interactions with Windows security. When a SID has been used as the unique identifier for a user or group, it cannot be used again to identify another user or group.

SIDType
Data type: uint8
Access type: Read-only

Enumerated values that specify the type of security identifier (SID).

NameValue

SidTypeUser

1

SidTypeGroup

2

SidTypeDomain

3

SidTypeAlias

4

SidTypeWellKnownGroup

5

SidTypeDeletedAccount

6

SidTypeInvalid

7

SidTypeUnknown

8

SidTypeComputer

9

 

Status
Data type: string
Access type: Read-only

Current status of the object. Various operational and nonoperational statuses can be defined. Operational statuses include: "OK", "Degraded", and "Pred Fail" (an element, such as a SMART-enabled hard disk drive, may be functioning properly but predicts a failure in the near future). Nonoperational statuses include: "Error", "Starting", "Stopping", and "Service". The latter, "Service", can apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is online, yet the managed element is neither "OK" nor in one of the other states.

This property is inherited from the CIM_ManagedSystemElement class.

The values are:

"OK"

"Error"

"Degraded"

"Unknown"

"Pred Fail"

"Starting"

"Stopping"

"Service"

Remarks

The Win32_Account class is derived from CIM_LogicalElement.

Examples

For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.

For C++ code examples, see WMI C++ Application Examples.

For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.

For example code, see WMI C++ Application Examples.

Requirements

Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
MOFCimwin32.mof
DLLCimwin32.dll
Namespace\root\cimv2

See Also

Operating System Classes

Send comments about this topic to Microsoft

Build date: 11/3/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Why is this class documented as "abstract"?      Thomas Lee   |   Edit   |   Show History

In the above description, the WIn32_Account class is said to be abstract. Please explain how this is abstract (when other similar classes are not thus described).

Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker