CIM_UnitaryComputerSystem

CIM Unitary Computer System
root/cimv2abstractkey : Name

The CIM_UnitaryComputerSystem class represents a desktop, mobile, network computer, server, or other type of single-node computer system.

On this page

Main example

List instances

# Abstract class: Get-CimInstance returns the instances of its subclasses
Get-CimInstance -ClassName CIM_UnitaryComputerSystem |
    Select-Object -Property Name, Description, Status, InstallDate

Abstract class: it has no instances of its own. Get-CimInstance returns the instances of its subclasses (Win32_ComputerSystem).

Examples

Decode numeric values

# Lookup table for PowerState (values documented by Microsoft)
$powerStateName = @{
    0 = 'Unknown'
    1 = 'Full Power'
    2 = 'Power Save - Low Power Mode'
    3 = 'Power Save - Standby'
    4 = 'Power Save - Unknown'
    5 = 'Power Cycle'
    6 = 'Power Off'
    7 = 'Power Save - Warning'
    8 = 'Power Save - Hibernate'
    9 = 'Power Save - Soft Off'
}
# Lookup table for ResetCapability (values documented by Microsoft)
$resetCapabilityName = @{
    1 = 'Other'
    2 = 'Unknown'
    3 = 'Disabled'
    4 = 'Enabled'
    5 = 'Not Implemented'
}

Get-CimInstance -ClassName CIM_UnitaryComputerSystem |
    Select-Object -Property @(
        'Name'
        'Description'
        'Status'
        'InstallDate'
        @{ Name = 'PowerState'; Expression = { $powerStateName[[int]$_.PowerState] } }
        @{ Name = 'ResetCapability'; Expression = { $resetCapabilityName[[int]$_.ResetCapability] } }
    )

Query a remote computer (CIM session)

review before running
# Name of the remote computer
$computerName = 'SERVER01'
# The CIM session (WSMan by default) can be reused for several queries
$cimSession = New-CimSession -ComputerName $computerName
try {
    Get-CimInstance -CimSession $cimSession -ClassName CIM_UnitaryComputerSystem |
        Select-Object -Property Name, Description, Status, InstallDate
} finally {
    Remove-CimSession -CimSession $cimSession
}

WSMan (WinRM) is used by default. For a host without WinRM, create the session with -SessionOption (New-CimSessionOption -Protocol Dcom). Add -Credential to use another account.

Show the class structure

# Class structure: properties, types and flags (Key, ReadOnly…)
$cimClass = Get-CimClass -ClassName CIM_UnitaryComputerSystem
$cimClass.CimClassProperties |
    Select-Object -Property Name, CimType, Flags

Properties

16 of 16 properties
NameTypeAccessDescription
Captionstringread

Short textual description of the object.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Caption for each instance
Get-CimInstance -ClassName CIM_UnitaryComputerSystem -Property Name, Caption |
    Select-Object -Property Name, Caption
CreationClassName keystringread

Name of the class or subclass used in the creation of an instance. When used with other key properties of the class, this property allows all instances of the class and its subclasses to be uniquely identified.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of CreationClassName for each instance
Get-CimInstance -ClassName CIM_UnitaryComputerSystem -Property Name, CreationClassName |
    Select-Object -Property Name, CreationClassName
Descriptionstringread

Textual description of the object.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Description for each instance
Get-CimInstance -ClassName CIM_UnitaryComputerSystem -Property Name, Description |
    Select-Object -Property Name, Description
InitialLoadInfostring[]read

Data needed to find either the initial load device (its key) or the boot service to request the operating system to start. In addition, the load parameters (that is, a path name and parameters) can also be specified.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of InitialLoadInfo for each instance
# InitialLoadInfo is an array: -ExpandProperty returns its items one by one
Get-CimInstance -ClassName CIM_UnitaryComputerSystem -Property InitialLoadInfo |
    Select-Object -ExpandProperty InitialLoadInfo
InstallDatedatetimeread

Date and time the object was installed. This property does not need a value to indicate that the object is installed.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of InstallDate for each instance
# CIM cmdlets already return a DateTime object: no conversion is needed
Get-CimInstance -ClassName CIM_UnitaryComputerSystem -Property Name, InstallDate |
    Select-Object -Property Name, InstallDate
LastLoadInfostringread

Data that identifies either the initial load device (its key) or the boot service that requested the last operating system load. In addition, the load parameters (that is, a path name and parameters) can also be specified.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of LastLoadInfo for each instance
Get-CimInstance -ClassName CIM_UnitaryComputerSystem -Property Name, LastLoadInfo |
    Select-Object -Property Name, LastLoadInfo
Name keystringread

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

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Name for each instance
Get-CimInstance -ClassName CIM_UnitaryComputerSystem -Property Name |
    Select-Object -Property Name
NameFormatstringread

The CIM_ComputerSystem object and its derivatives are top-level objects of CIM that provide the scope for numerous components and require unique CIM_System keys. A heuristic is defined to create the CIM_ComputerSystem name in an attempt to always generate the same system name, independent of discovery protocol. This prevents inventory and management problems where the same asset or entity is discovered multiple times, but cannot be resolved to a single object. This property identifies how the system name was generated by using the subclass heuristic. The heuristic is outlined in the CIM V2 Common Model specification and assumes that the documented rules are traversed to determine and assign a name. The NameFormat values list defines the precedence order for assigning the system name with several rules mapping to the same value. Note that the CIM_ComputerSystem name that is calculated using the heuristic is the system's key value. Other names can be assigned and used for the CIM_ComputerSystem that better suit the business, using aliases.

Values include the following:

Values (14)
ValueLabelDescription
IPIP
DialDial
HIDHID
NWANWA
HWAHWA
X25X25
ISDNISDN
IPXIPX
DCCDCC
ICDICD
E.164E.164
SNASNA
OID/OSIOID/OSI
OtherOther
Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of NameFormat for each instance
Get-CimInstance -ClassName CIM_UnitaryComputerSystem -Property Name, NameFormat |
    Select-Object -Property Name, NameFormat
PowerManagementCapabilitiesuint16[]read

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

Values (8)
ValueLabelDescription
0Unknown
1Not Supported
2Disabled
3EnabledThe power management features are currently enabled but the exact feature set is unknown or the information is unavailable.
4Power Saving Modes Entered AutomaticallyThe device can change its power state based on usage or other criteria.
5Power State SettableThe 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.
6Power Cycling SupportedThe SetPowerState method can be invoked with the *PowerState* parameter set to 5 (Power Cycle).
7Timed Power On SupportedThe 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.
Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of PowerManagementCapabilities for each instance
# Lookup table for PowerManagementCapabilities (values documented by Microsoft)
$powerManagementCapabilitiesName = @{
    0 = 'Unknown'
    1 = 'Not Supported'
    2 = 'Disabled'
    3 = 'Enabled'
    4 = 'Power Saving Modes Entered Automatically'
    5 = 'Power State Settable'
    6 = 'Power Cycling Supported'
    7 = 'Timed Power On Supported'
}
# PowerManagementCapabilities is an array: -ExpandProperty returns its items one by one
Get-CimInstance -ClassName CIM_UnitaryComputerSystem -Property PowerManagementCapabilities |
    Select-Object -ExpandProperty PowerManagementCapabilities |
    ForEach-Object -Process { $powerManagementCapabilitiesName[[int]$_] }
PowerManagementSupportedbooleanread

If TRUE, the device can be power managed, that is, put into a power-save state. If FALSE, the integer value 1 ("Not Supported") should be the only entry in the PowerManagementCapabilities array.

This property does not indicate whether power management features are currently enabled, or if enabled, which features are supported. For more information, see the PowerManagementCapabilities array.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of PowerManagementSupported for each instance
Get-CimInstance -ClassName CIM_UnitaryComputerSystem -Property Name, PowerManagementSupported |
    Select-Object -Property Name, PowerManagementSupported
PowerStateuint16read

Current power state of the computer system and its associated operating system.

Values (10)
ValueLabelDescription
0Unknown
1Full Power
2Power Save - Low Power ModeSystem is in a power-save state and still functioning, but may exhibit degraded performance.
3Power Save - StandbySystem is not functioning, but could be brought to full power quickly.
4Power Save - UnknownSystem is known to be in a power-save mode, but its exact status is unknown.
5Power Cycle
6Power Off
7Power Save - WarningSystem is in a warning state and also in a power-save mode.
8Power Save - HibernatePower save hibernate.
9Power Save - Soft OffPower save soft off.
Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of PowerState for each instance
# Lookup table for PowerState (values documented by Microsoft)
$powerStateName = @{
    0 = 'Unknown'
    1 = 'Full Power'
    2 = 'Power Save - Low Power Mode'
    3 = 'Power Save - Standby'
    4 = 'Power Save - Unknown'
    5 = 'Power Cycle'
    6 = 'Power Off'
    7 = 'Power Save - Warning'
    8 = 'Power Save - Hibernate'
    9 = 'Power Save - Soft Off'
}
Get-CimInstance -ClassName CIM_UnitaryComputerSystem -Property Name, PowerState |
    Select-Object -Property @(
        'Name'
        @{ Name = 'PowerState'; Expression = { $powerStateName[[int]$_.PowerState] } }
    )
PrimaryOwnerContactstringread

String that provides information on how to reach the primary system owner (for example, phone number, email address, and so on).

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of PrimaryOwnerContact for each instance
Get-CimInstance -ClassName CIM_UnitaryComputerSystem -Property Name, PrimaryOwnerContact |
    Select-Object -Property Name, PrimaryOwnerContact
PrimaryOwnerNamestringread

Name of the primary system owner.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of PrimaryOwnerName for each instance
Get-CimInstance -ClassName CIM_UnitaryComputerSystem -Property Name, PrimaryOwnerName |
    Select-Object -Property Name, PrimaryOwnerName
ResetCapabilityuint16read

If enabled, the unitary computer system can be reset with hardware (for example, with the power and reset buttons). If disabled, hardware reset is not allowed.

Values (5)
ValueLabelDescription
1Other
2Unknown
3Disabled
4Enabled
5Not Implemented
Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of ResetCapability for each instance
# Lookup table for ResetCapability (values documented by Microsoft)
$resetCapabilityName = @{
    1 = 'Other'
    2 = 'Unknown'
    3 = 'Disabled'
    4 = 'Enabled'
    5 = 'Not Implemented'
}
Get-CimInstance -ClassName CIM_UnitaryComputerSystem -Property Name, ResetCapability |
    Select-Object -Property @(
        'Name'
        @{ Name = 'ResetCapability'; Expression = { $resetCapabilityName[[int]$_.ResetCapability] } }
    )
Rolesstring[]read/write

Roles the system plays in the information technology environment. Subclasses of the system can override this property to define explicit role values. Alternately, a working group can describe the heuristics, conventions, and guidelines for specifying roles. For example, for an instance of a networking system, this property might contain the string "Switch" or "Bridge".

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Roles for each instance
# Roles is an array: -ExpandProperty returns its items one by one
Get-CimInstance -ClassName CIM_UnitaryComputerSystem -Property Roles |
    Select-Object -ExpandProperty Roles

Warning. Changes the system: check with -WhatIf first. An elevated console is often required.

# Warning: changes Roles on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName CIM_UnitaryComputerSystem -Filter "Name = 'Example'"
$setParameters = @{
    InputObject = $instance
    Property    = @{ Roles = @('Example') }
    WhatIf      = $true  # Remove this line to actually apply the change
}
Set-CimInstance @setParameters
Statusstringread

Current status of the object. This property is inherited from CIM_ManagedSystemElement.

Values include the following:

Values (12)
ValueLabelDescription
OKOK
ErrorError
DegradedDegraded
UnknownUnknown
Pred FailPred Fail
StartingStarting
StoppingStopping
ServiceService
StressedStressed
NonRecoverNonRecover
No ContactNo Contact
Lost CommLost Comm
Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Status for each instance
Get-CimInstance -ClassName CIM_UnitaryComputerSystem -Property Name, Status |
    Select-Object -Property Name, Status

Remarks

The CIM_UnitaryComputerSystem class is derived from CIM_ComputerSystem.

WMI does not implement this class. For WMI classes derived from CIM_UnitaryComputerSystem, see Win32 Classes.

This documentation is derived from the CIM class descriptions published by the DMTF. Microsoft may have made changes to correct minor errors, conform to Microsoft SDK documentation standards, or provide more information.

Inheritance

Superclass chain

  1. CIM_ManagedSystemElement
  2. CIM_LogicalElement
  3. CIM_System
  4. CIM_ComputerSystem
  5. CIM_UnitaryComputerSystem

Known subclasses

Requirements

Namespace
root/cimv2
Minimum client
Windows Vista
Minimum server
Windows Server 2008
MOF file
CIMWin32.mof
DLL
CIMWin32.dll
Class qualifiers

Abstract UUID("{8502C526-5FBB-11D2-AAC1-006008C78BC7}") AMENDMENT

Microsoft source

Source: Microsoft Learn

Descriptions, properties and methods come from the Microsoft documentation (MicrosoftDocs/win32 repository), published under the CC BY 4.0 licence. Formatting and translations are specific to this site; the PowerShell examples are written for it.