WMI002-WMI学习笔记(二)——Win32_Account类

原文链接:

http://msdn.microsoft.com/en-us/library/aa394061(v=vs.85).aspx

测试代码:

http://blog.csdn.net/eyuanatqqdotcom/article/details/7462720

Applies to: desktop apps only

应用于:桌面应用程序

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.

Win32_Account 包含关于用户账户和组(域)账户信息的信息。

以下是Managed Object Format (MOF)管理对象格式的原型,以及所有的属性,属性安装字母顺序列出。

Syntax

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

Members

The Win32_Account class has these types of members:

Properties

The Win32_Account class has these properties.

包含以下属性:

Caption 标题
Data type:  string 数据类型:string Access type: Read-only 访问类型:只读 Qualifiers:  MaxLen (64)

Short description of the object. This property is inherited from the CIM_ManagedSystemElement class.

Description 描述
Data type:  string 数据类型: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.

用户或者用户组属于的Windows域

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 theCIM_ManagedSystemElement class.

LocalAccount [是否是]本地账户
Data type:  boolean 数据类型: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".

如果值为真,则账号为本地账号。

仅仅检索本地账号时,可以在查询语句中加入条件"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 fromCIM_ManagedSystemElement.

域中的Windows系统账号,由域属性指定。

SID 安全ID
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.

账号的安全标识符。

可变长的字符串值,用于标识账户。

每一个账号的SID值唯一,由认证者指定(例如Windows域),并被保存在安全数据库中。

SIDType
Data type:  uint8 Access type: Read-only

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

SID的类型标识值的枚举。

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 client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Namespace

\root\CIMV2

MOF

Cimwin32.mof

DLL

Cimwin32.dll

See also

Operating System Classes



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值