Upravit

Sdílet prostřednictvím


Win32_ComputerSystem class

The Win32_ComputerSystem WMI class represents a computer system running Windows.

The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties.

Syntax

[Dynamic, Provider("CIMWin32"), SupportsUpdate, UUID("{8502C4B0-5FBB-11D2-AAC1-006008C78BC7}"), AMENDMENT]
class Win32_ComputerSystem : CIM_UnitaryComputerSystem
{
  uint16   AdminPasswordStatus;
  boolean  AutomaticManagedPagefile;
  boolean  AutomaticResetBootOption;
  boolean  AutomaticResetCapability;
  uint16   BootOptionOnLimit;
  uint16   BootOptionOnWatchDog;
  boolean  BootROMSupported;
  string   BootupState;
  uint16   BootStatus[];
  string   Caption;
  uint16   ChassisBootupState;
  string   ChassisSKUNumber;
  string   CreationClassName;
  sint16   CurrentTimeZone;
  boolean  DaylightInEffect;
  string   Description;
  string   DNSHostName;
  string   Domain;
  uint16   DomainRole;
  boolean  EnableDaylightSavingsTime;
  uint16   FrontPanelResetStatus;
  boolean  HypervisorPresent;
  boolean  InfraredSupported;
  string   InitialLoadInfo[];
  datetime InstallDate;
  uint16   KeyboardPasswordStatus;
  string   LastLoadInfo;
  string   Manufacturer;
  string   Model;
  string   Name;
  string   NameFormat;
  boolean  NetworkServerModeEnabled;
  uint32   NumberOfLogicalProcessors;
  uint32   NumberOfProcessors;
  uint8    OEMLogoBitmap[];
  string   OEMStringArray[];
  boolean  PartOfDomain;
  sint64   PauseAfterReset;
  uint16   PCSystemType;
  uint16   PCSystemTypeEx;
  uint16   PowerManagementCapabilities[];
  boolean  PowerManagementSupported;
  uint16   PowerOnPasswordStatus;
  uint16   PowerState;
  uint16   PowerSupplyState;
  string   PrimaryOwnerContact;
  string   PrimaryOwnerName;
  uint16   ResetCapability;
  sint16   ResetCount;
  sint16   ResetLimit;
  string   Roles[];
  string   Status;
  string   SupportContactDescription[];
  string   SystemFamily;
  string   SystemSKUNumber;
  uint16   SystemStartupDelay;
  string   SystemStartupOptions[];
  uint8    SystemStartupSetting;
  string   SystemType;
  uint16   ThermalState;
  uint64   TotalPhysicalMemory;
  string   UserName;
  uint16   WakeUpType;
  string   Workgroup;
};

Members

The Win32_ComputerSystem class has these types of members:

Methods

The Win32_ComputerSystem class has these methods.

Method Description
JoinDomainOrWorkgroup Adds a computer system to a domain or workgroup.
Rename Renames a local computer.
SetPowerState Not implemented. For more information about how to implement this method, see the SetPowerState method in CIM_UnitaryComputerSystem.
UnjoinDomainOrWorkgroup Removes a computer system from a domain or workgroup.

Properties

The Win32_ComputerSystem class has these properties.

AdminPasswordStatus

Data type: uint16

Access type: Read-only

Qualifiers: MappingStrings ("SMBIOS|Type 24|Hardware Security Settings|AdminPasswordStatus")

System hardware security settings for administrator password status.

Disabled (0)

Enabled (1)

Not Implemented (2)

Unknown (3)

AutomaticManagedPagefile

Data type: boolean

Access type: Read/write

Qualifiers: MappingStrings ("WMI")

If True, the system manages the page file.

AutomaticResetBootOption

Data type: boolean

Access type: Read/write

Qualifiers: MappingStrings ("Win32Registry|HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\CrashControl|AutoReboot")

If True, the automatic reset boot option is enabled.

AutomaticResetCapability

Data type: boolean

Access type: Read-only

Qualifiers: MappingStrings ("WMI")

If True, the automatic reset is enabled.

BootOptionOnLimit

Data type: uint16

Access type: Read-only

Qualifiers: MappingStrings ("SMBIOS|Type 23|Capabilites|Boot Option on Limit")

Boot option limit is ON. Identifies the system action when the ResetLimit value is reached.

Reserved (0)

Operating system (1)

System utilities (2)

Do not reboot (3)

BootOptionOnWatchDog

Data type: uint16

Access type: Read-only

Qualifiers: MappingStrings ("SMBIOS|Type 23|Capabilities|Boot Option")

Type of reboot action after the time on the watchdog timer is elapsed.

Reserved (0)

Operating system (1)

System utilities (2)

Do not reboot (3)

BootROMSupported

Data type: boolean

Access type: Read-only

Qualifiers: MappingStrings ("WMI")

If True, indicates whether a boot ROM is supported.

BootStatus

Data type: uint16 array

Access type: Read-only

Qualifiers: MappingStrings ("SMBIOS|Type 32|System Boot Information|Boot Status")

Status and Additional Data fields that identify the boot status.

This value comes from the Boot Status member of the System Boot Information structure in the SMBIOS information.

Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008 and Windows Vista: This property is not supported before Windows 10 and Windows Server 2016.

BootupState

Data type: string

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|GetSystemMetrics|SM_CLEANBOOT")

System is started. Fail-safe boot bypasses the user startup files also called SafeBoot.

The following list contains the required values:

"Normal boot"
"Fail-safe boot"
"Fail-safe with network boot"

Normal boot ("Normal boot")

Fail-safe boot ("Fail-safe boot")

Fail-safe with network boot ("Fail-safe with network boot")

Caption

Data type: string

Access type: Read-only

Qualifiers: MaxLen (64), DisplayName ("Caption")

Short description of the object a one-line string.

This property is inherited from CIM_ManagedSystemElement.

ChassisBootupState

Data type: uint16

Access type: Read-only

Qualifiers: MappingStrings ("SMBIOS|Type 3|Bootup State")

Boot up state of the chassis.

This value comes from the Boot-up State member of the System Enclosure or Chassis structure in the SMBIOS information.

Other (1)

Unknown (2)

Safe (3)

Warning (4)

Critical (5)

Non-recoverable (6)

ChassisSKUNumber

Data type: string

Access type: Read-only

Qualifiers: MappingStrings ("SMBIOS|Type 3|Chassis|SKU Number")

The chassis or enclosure SKU number as a string.

This value comes from the SKU Number member of the System Enclosure or Chassis structure in the SMBIOS information.

Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008 and Windows Vista: This property is not supported before Windows 10 and Windows Server 2016.

CreationClassName

Data type: string

Access type: Read-only

Qualifiers: CIM_Key

Name of the first concrete class in the inheritance chain of an instance. You can use this property with other properties of the class to identify all instances of the class and its subclasses.

This property is inherited from CIM_System.

CurrentTimeZone

Data type: sint16

Access type: Read/write

Qualifiers: MappingStrings ("Win32API|Time Structures|TIME_ZONE_INFORMATION|Bias"), Units ("minutes")

Amount of time the unitary computer system is offset from Coordinated Universal Time (UTC).

DaylightInEffect

Data type: boolean

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Time Functions|GetTimeZoneInformation")

If True, the daylight savings mode is ON.

Description

Data type: string

Access type: Read-only

Qualifiers: DisplayName ("Description")

Description of the object.

This property is inherited from CIM_ManagedSystemElement.

DNSHostName

Data type: string

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|GetComputerNameEx|ComputerNameDnsHostname")

Name of local computer according to the domain name server (DNS).

Domain

Data type: string

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Network Management Structures|WKSTA_INFO_100|wki100_langroup")

Name of the domain to which a computer belongs.

Note

If the computer is not part of a domain, then the name of the workgroup is returned.

DomainRole

Data type: uint16

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Directory Service (Ds) Structures| DSROLE_PRIMARY_DOMAIN_INFO_BASIC|DSROLE_MACHINE_ROLE| MachineRole")

Role of a computer in an assigned domain workgroup. A domain workgroup is a collection of computers on the same network. For example, a DomainRole property may show that a computer is a member workstation.

This property is inherited from CIM_ManagedSystemElement.

Standalone Workstation (0)

Member Workstation (1)

Standalone Server (2)

Member Server (3)

Backup Domain Controller (4)

Primary Domain Controller (5)

EnableDaylightSavingsTime

Data type: boolean

Access type: Read/write

Enables daylight savings time (DST) on a computer. A value of True indicates that the system time changes to an hour ahead or behind when DST starts or ends. A value of False indicates that the system time does not change to an hour ahead or behind when DST starts or ends. A value of NULL indicates that the DST status is unknown on a system.

FrontPanelResetStatus

Data type: uint16

Access type: Read-only

Qualifiers: MappingStrings ("SMBIOS|Type 24|Hardware Security Settings|FrontPanelResetStatus")

The following table lists the hardware security settings for the reset button on a computer.

Disabled (0)

Enabled (1)

Not Implemented (2)

Unknown (3)

HypervisorPresent

Data type: boolean

Access type: Read-only

Qualifiers: MappingStrings ("WMI")

If True, a hypervisor is present.

Windows Server 2008 R2, Windows 7, Windows Server 2008 and Windows Vista: This property is not supported before Windows 8 and Windows Server 2012.

InfraredSupported

Data type: boolean

Access type: Read-only

Qualifiers: MappingStrings ("WMI")

If True, an infrared (IR) port exists on a computer system.

InitialLoadInfo

Data type: string array

Access type: Read-only

Data required to find the initial load device or boot service to request that the operating system start up.

This property is inherited from CIM_UnitaryComputerSystem.

Windows Server 2008 R2: This property is available, but empty.

InstallDate

Data type: datetime

Access type: Read-only

Qualifiers: MappingStrings ("MIF.DMTF|ComponentID|001.5"), DisplayName ("Install Date")

Object is installed. An object does not need a value to indicate that it is installed.

This property is inherited from CIM_ManagedSystemElement.

KeyboardPasswordStatus

Data type: uint16

Access type: Read-only

Qualifiers: MappingStrings ("SMBIOS|Type 24|Hardware Security Settings|KeyboardPasswordStatus")

System hardware security settings for Keyboard Password Status.

Disabled (0)

Enabled (1)

Not Implemented (2)

Unknown (3)

LastLoadInfo

Data type: string

Access type: Read-only

Array entry of the InitialLoadInfo property that contains the data to start the loaded operating system.

This property is inherited from CIM_UnitaryComputerSystem.

Manufacturer

Data type: string

Access type: Read-only

Qualifiers: MappingStrings ("SMBIOS|Type 1|System Information|Manufacturer")

Name of a computer manufacturer.

Example: Adventure Works

Model

Data type: string

Access type: Read-only

Qualifiers: MappingStrings ("SMBIOS|Type 1|System Information|Product Name")

Product name that a manufacturer gives to a computer. This property must have a value.

Name

Data type: string

Access type: Read-only

Qualifiers: Key

Key of a CIM_System instance in an enterprise environment.

This property is inherited from CIM_ManagedSystemElement.

NameFormat

Data type: string

Access type: Read-only

Computer system Name value that is generated automatically. The CIM_ComputerSystem object and its derivatives are top-level objects of the Common Information Model (CIM). They provide the scope for several components. Unique CIM_System keys are required, but you can define a heuristic to create the CIM_ComputerSystem name that generates the same name, and is independent from the discovery protocol. This prevents inventory and management problems when the same asset or entity is discovered multiple times, but cannot be resolved to one object. Using a heuristic is recommended, but not required.

The heuristic is outlined in the CIM V2 Common Model specification, and assumes that the documented rules are used to determine and assign a name. The NameFormat values list defines the order to assign a computer system name. Several rules map to the same value.

The CIM_ComputerSystem Name value that is calculated using the heuristic is the key value of the system. However, use aliases to assign a different name for CIM_ComputerSystem, which can be more unique to your company.

This property is inherited from CIM_System.

Values include the following:

IP ("IP")

Dial ("Dial")

HID ("HID")

NWA ("NWA")

HWA ("HWA")

X25 ("X25")

ISDN ("ISDN")

IPX ("IPX")

DCC ("DCC")

ICD ("ICD")

E.164 ("E.164")

SNA ("SNA")

OID/OSI ("OID/OSI")

Other ("Other")

NetworkServerModeEnabled

Data type: boolean

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Network Management Structures|SERVER_INFO_101|sv101_type|SV_TYPE_SERVER")

If True, the network Server Mode is enabled.

NumberOfLogicalProcessors

Data type: uint32

Access type: Read-only

Qualifiers: MappingStrings ("WMI")

Number of logical processors available on the computer.

You can use NumberOfLogicalProcessors and NumberOfProcessors to determine if the computer is hyperthreading. For more information, see Remarks.

NumberOfProcessors

Data type: uint32

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|System Information Structures|SYSTEM_INFO|dwNumberOfProcessors")

Number of physical processors currently available on a system. This is the number of enabled processors for a system, which does not include the disabled processors. If a computer system has two physical processors each containing two logical processors, then the value of NumberOfProcessors is 2 and NumberOfLogicalProcessors is 4. The processors may be multicore or they may be hyperthreading processors. For more information, see Remarks.

OEMLogoBitmap

Data type: uint8 array

Access type: Read-only

Qualifiers: MappingStrings ("WMI")

List of data for a bitmap that the original equipment manufacturer (OEM) creates.

OEMStringArray

Data type: string array

Access type: Read-only

Qualifiers: MappingStrings ("SMBIOS|Type 11|OEM Strings")

List of free-form strings that an OEM defines. For example, an OEM defines the part numbers for system reference documents, manufacturer contact information, and so on.

PartOfDomain

Data type: boolean

Access type: Read-only

Qualifiers: MappingStrings ("")

If True, the computer is part of a domain. If the value is NULL, the computer is not in a domain or the status is unknown. If you remove the computer from a domain, the value becomes false.

PauseAfterReset

Data type: sint64

Access type: Read-only

Qualifiers: MappingStrings ("SMBIOS|Type 23|Timeout"), Units ("milliseconds")

Time delay before a reboot is initiated in milliseconds. It is used after a system power cycle, local or remote system reset, and automatic system reset. A value of 1 (minus one) indicates that the pause value is unknown.

Windows Vista: This property may return an unknown number.

PCSystemType

Data type: uint16

Access type: Read-only

Qualifiers: MappingStrings ("")

Type of the computer in use, such as laptop, desktop, or Tablet.

Unspecified (0)

Desktop (1)

Mobile (2)

Workstation (3)

Enterprise Server (4)

SOHO Server (5)

Small Office and Home Office (SOHO) Server

Appliance PC (6)

Performance Server (7)

Maximum (8)

PCSystemTypeEx

Data type: uint16

Access type: Read-only

Qualifiers: MappingStrings ("")

Type of the computer in use, such as laptop, desktop, or Tablet.

Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008 and Windows Vista: This property is not supported before Windows 8.1 and Windows Server 2012 R2.

Unspecified (0)

Desktop (1)

Mobile (2)

Workstation (3)

Enterprise Server (4)

SOHO Server (5)

Appliance PC (6)

Performance Server (7)

Slate (8)

Maximum (9)

PowerManagementCapabilities

Data type: uint16 array

Access type: Read-only

Qualifiers: MappingStrings ("MIF.DMTF|System Power Controls|001.2")

Array of the specific power-related capabilities of a logical device.

This property is inherited from CIM_LogicalDevice.

Unknown (0)

Not Supported (1)

Disabled (2)

Enabled (3)

The power management features are currently enabled, but the exact feature set is unknown or the information is unavailable.

Power Saving Modes Entered Automatically (4)

The device can change its power state based on usage or other criteria.

Power State Settable (5)

The SetPowerState method is supported. This method is found on the parent CIM_LogicalDevice class and can be implemented. For more information, see Designing Managed Object Format (MOF) Classes.

Power Cycling Supported (6)

The SetPowerState method can be invoked with the PowerState parameter set to 5 (Power Cycle).

Timed Power On Supported (7)

Timed Power-On Supported

The SetPowerState method can be invoked with the PowerState parameter set to 5 (Power Cycle) and Time set to a specific date and time, or interval, for power-on.

PowerManagementSupported

Data type: boolean

Access type: Read-only

If True, device can be power-managed, for example, a device can be put into suspend mode, and so on. This property does not indicate that power management features are enabled currently, but it does indicate that the logical device is capable of power management.

This property is inherited from CIM_UnitaryComputerSystem.

PowerOnPasswordStatus

Data type: uint16

Access type: Read-only

Qualifiers: MappingStrings ("SMBIOS|Type 24|Hardware Security Settings|PowerOnPasswordStatus")

System hardware security settings for Power-On Password Status.

Disabled (0)

Enabled (1)

Not Implemented (2)

Unknown (3)

PowerState

Data type: uint16

Access type: Read-only

Current power state of a computer and its associated operating system. The power saving states have the following values: Value 4 (Unknown) indicates that the system is known to be in a power save mode, but its exact status in this mode is unknown; 2 (Low Power Mode) indicates that the system is in a power save state, but still functioning and may exhibit degraded performance; 3 (Standby) indicates that the system is not functioning, but could be brought to full power quickly; and 7 (Warning) indicates that the computer system is in a warning state and a power save mode.

This property is inherited from CIM_UnitaryComputerSystem.

Unknown (0)

Full Power (1)

Power Save - Low Power Mode (2)

Power Save - Standby (3)

Power Save - Unknown (4)

Power Cycle (5)

Power Off (6)

Power Save - Warning (7)

Power Save - Hibernate (8)

Power save hibernate.

Power Save - Soft Off (9)

Power save soft off.

PowerSupplyState

Data type: uint16

Access type: Read-only

Qualifiers: MappingStrings ("SMBIOS|Type 3|System Enclosure or Chassis|Power Supply State")

State of the power supply or supplies when last booted.

This value comes from the Power Supply State member of the System Enclosure or Chassis structure in the SMBIOS information.

The following list identifies the values for this property.

Other (1)

Unknown (2)

Safe (3)

Warning (4)

Critical (5)

Non-recoverable (6)

Nonrecoverable

PrimaryOwnerContact

Data type: string

Access type: Read-only

Contact information for the primary system owner, for example, phone number, email address, and so on.

This property is inherited from CIM_System.

PrimaryOwnerName

Data type: string

Access type: Read-only

Qualifiers: MaxLen (64)

Name of the primary system owner.

This property is inherited from CIM_System.

ResetCapability

Data type: uint16

Access type: Read-only

Qualifiers: MappingStrings ("MIF.DMTF|System Hardware Security|001.4")

If enabled, the value is 4 and the unitary computer system can be reset using the power and reset buttons. If disabled, the value is 3, and a reset is not allowed.

This property is inherited from CIM_UnitaryComputerSystem.

Other (1)

Unknown (2)

Disabled (3)

Enabled (4)

Not Implemented (5)

Nonrecoverable

ResetCount

Data type: sint16

Access type: Read-only

Qualifiers: MappingStrings ("SMBIOS|Type 23|System Reset|Reset Count")

Number of automatic resets since the last reset. A value of 1 (minus one) indicates that the count is unknown.

ResetLimit

Data type: sint16

Access type: Read-only

Qualifiers: MappingStrings ("SMBIOS|Type 23|System Reset| Reset Limit")

Number of consecutive times a system reset is attempted. A value of 1 (minus one) indicates that the limit is unknown.

Roles

Data type: string array

Access type: Read/write

List that specifies the roles of a system in the information technology environment.

This property is inherited from CIM_System.

Status

Data type: string

Access type: Read-only

Qualifiers: MaxLen (10), DisplayName ("Status")

Current status of an object.

For Win32_ComputerSystem, the Status is always “OK”.

This property is inherited from CIM_ManagedSystemElement.

SupportContactDescription

Data type: string array

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|GetPrivateProfileString|Support Information")

List of the support contact information for the Windows operating system.

SystemFamily

Data type: string

Access type: Read-only

Qualifiers: MappingStrings ("SMBIOS|Type 1|System Information|Family")

The family to which a particular computer belongs. A family refers to a set of computers that are similar but not identical from a hardware or software point of view.

This value comes from the Family member of the System Information structure in the SMBIOS information.

Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008 and Windows Vista: This property is not supported before Windows 10 and Windows Server 2016.

SystemSKUNumber

Data type: string

Access type: Read-only

Qualifiers: MappingStrings ("SMBIOS|Type 1|System Information|SKU Number")

Identifies a particular computer configuration for sale. It is sometimes also called a product ID or purchase order number.

This value comes from the SKU Number member of the System Information structure in the SMBIOS information.

Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008 and Windows Vista: This property is not supported before Windows 10 and Windows Server 2016.

SystemStartupDelay

Data type: uint16

Access type: Read/write

Qualifiers: DEPRECATED, Privileges ("SeSystemEnvironmentPrivilege"), MappingStrings ("Win32API|GetPrivateProfileInt|Boot Loader|timeout"), units ("seconds")

SystemStartupDelay is no longer available for use because Boot.ini is not used to configure system startup. Instead, use the BCD classes supplied by the Boot Configuration Data (BCD) WMI provider or the Bcdedit command.

SystemStartupOptions

Data type: string array

Access type: Read/write

Qualifiers: DEPRECATED, Privileges ("SeSystemEnvironmentPrivilege"), MappingStrings ("Win32API|GetPrivateProfileSection|Operating Systems")

SystemStartupOptions is no longer available for use because Boot.ini is not used to configure system startup. Instead, use the BCD classes supplied by the Boot Configuration Data (BCD) WMI provider or the Bcdedit command.

SystemStartupSetting

Data type: uint8

Access type: Read/write

Qualifiers: DEPRECATED, Privileges ("SeSystemEnvironmentPrivilege"), MappingStrings ("WMI")

SystemStartupSetting is no longer available for use because Boot.ini is not used to configure system startup. Instead, use the BCD classes supplied by the Boot Configuration Data (BCD) WMI provider or the Bcdedit command.

SystemType

Data type: string

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|System Information Structures|SYSTEM_INFO|wProcessorArchitecture")

System running on the Windows-based computer. This property must have a value.

The following list identifies some of the possible values for this property.

"x64-based PC"
"X86-based PC"
"MIPS-based PC"
"Alpha-based PC"
"Power PC"
"SH-x PC"
"StrongARM PC"
"64-bit Intel PC"
"64-bit Alpha PC"
"Unknown"
"X86-Nec98 PC"

X86-based PC ("X86-based PC")

MIPS-based PC ("MIPS-based PC")

Alpha-based PC ("Alpha-based PC")

Power PC ("Power PC")

SH-x PC ("SH-x PC")

StrongARM PC ("StrongARM PC")

64-bit Intel PC ("64-bit Intel PC")

x64-based PC ("x64-based PC")

Unknown ("Unknown")

X86-Nec98 PC ("X86-Nec98 PC")

ThermalState

Data type: uint16

Access type: Read-only

Qualifiers: MappingStrings ("SMBIOS|Type 3|System Enclosure or Chassis|Thermal State")

Thermal state of the system when last booted.

This value comes from the Thermal State member of the System Enclosure or Chassis structure in the SMBIOS information.

Other (1)

Unknown (2)

Safe (3)

Warning (4)

Critical (5)

Non-recoverable (6)

TotalPhysicalMemory

Data type: uint64

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|Memory Management Structures|MEMORYSTATUS|dwTotalPhys"), Units ("bytes")

Total size of physical memory. Be aware that, under some circumstances, this property may not return an accurate value for the physical memory. For example, it is not accurate if the BIOS is using some of the physical memory. For an accurate value, use the Capacity property in Win32_PhysicalMemory instead.

Example: 67108864

For more information about using uint64 values in scripts, see Scripting in WMI.

UserName

Data type: string

Access type: Read-only

Qualifiers: MappingStrings ("Win32API|System Information Functions|GetUserName")

Name of a user that is logged on currently. This property must have a value. In a terminal services session, UserName returns the name of the user that is logged on to the console not the user logged on during the terminal service session.

Example: jeffsmith

WakeUpType

Data type: uint16

Access type: Read-only

Qualifiers: MappingStrings ("SMBIOS|Type 1|System Information|Wake-up Type")

Event that causes the system to power up.

This value comes from the Wake-up Type member of the System Information structure in the SMBIOS information.

Reserved (0)

Other (1)

Unknown (2)

APM Timer (3)

Modem Ring (4)

LAN Remote (5)

Power Switch (6)

PCI PME# (7)

AC Power Restored (8)

Workgroup

Data type: string

Access type: Read/write

Qualifiers: MappingStrings ("")

Name of the workgroup for this computer. If the value of the PartOfDomain property is False, then the name of the workgroup is returned.

Remarks

To determine the total number of processor instances associated with a computer system object, use the Win32_ComputerSystemProcessor association class.

A Win32_ComputerSystem instance that has multiple physical processors has multiple Win32_Processor instances associated with it. If the value of NumberOfLogicalProcessors is greater than the value of NumberOfProcessors then the computer system is either a multicore system or has one or more processors enabled for hyperthreading. For more information, see the NumberOfLogicalProcessors and NumberOfCores properties and Remarks section in Win32_Processor.

The Win32_ComputerSystem class is derived from CIM_UnitaryComputerSystem.

Examples

You can find an example script that obtains operating system and processor data from Win32_ComputerSystem, Win32_Processor, and Win32_OperatingSystem in the Win32_Processor topic examples.

The following VBScript sample describes how to retrieve the domain name of the local machine from instances of Win32_ComputerSystem.

Set SystemSet = GetObject("winmgmts:").InstancesOf ("Win32_ComputerSystem")

for each System in SystemSet
 WScript.Echo System.Domain
next

The following Perl sample describes how to retrieve the local machine name from instances of Win32_ComputerSystem.

use strict;
use Win32::OLE;

my ($SystemSet, $System);  
eval {$SystemSet = Win32::OLE->GetObject("winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\cimv2")->
  InstancesOf ("Win32_ComputerSystem") };
  
unless($@)
{
 foreach $System (in $SystemSet)
 {
  print "\n", $System->{Domain}, "\n";
 }
}
else
{
 print STDERR Win32::OLE->LastError, "\n";
}

The following Perl sample describes how to retrieve the DNS domain name of the local machine from instances of Win32_ComputerSystem.

use strict;
use Win32::OLE;

close (STDERR);

my ($NICSet, $NIC);  
eval {$NICSet = Win32::OLE->GetObject("winmgmts:!\\\\.\\root\\cimv2")->
 ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled=true"); };
if (!$@ && defined $NICSet)
{
 foreach $NIC (in $NICSet)
 {
  if(defined $NIC->{DNSDomain})
  {
   print "\n", $NIC->{DNSDomain}, "\n";
  }
 }
}
else
{
 print Win32::OLE->LastError, "\n";
}

Requirements

Requirement Value
Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Namespace
Root\CIMV2
MOF
CIMWin32.mof
DLL
CIMWin32.dll

See also

CIM_UnitaryComputerSystem

Operating System Classes

WMI Tasks: Accounts and Domains

WMI Tasks: Computer Hardware

WMI Tasks: Desktop Management