CIM_SoftwareElementChecks

CIM Software Element Checks
root/cimv2abstractassociation

The CIM_SoftwareElementChecks association class relates a software element with condition or location information that a feature may require.

On this page

Main example

List instances

# Abstract class: Get-CimInstance returns the instances of its subclasses
Get-CimInstance -ClassName CIM_SoftwareElementChecks |
    Select-Object -Property Phase, Check, Element

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

Examples

Decode numeric values

# Lookup table for Phase (values documented by Microsoft)
$phaseName = @{
    0 = 'In-State'
    1 = 'Next-State'
}

Get-CimInstance -ClassName CIM_SoftwareElementChecks |
    Select-Object -Property @(
        @{ Name = 'Phase'; Expression = { $phaseName[[int]$_.Phase] } }
        'Check'
        'Element'
    )

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_SoftwareElementChecks |
        Select-Object -Property Phase, Check, Element
} 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_SoftwareElementChecks
$cimClass.CimClassProperties |
    Select-Object -Property Name, CimType, Flags

Properties

3 of 3 properties
NameTypeAccessDescription
CheckCIM_Checkread

Reference to the check.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Check for each instance
Get-CimInstance -ClassName CIM_SoftwareElementChecks -Property Check |
    Select-Object -Property Check
ElementCIM_SoftwareElementread

Reference to the element.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Element for each instance
Get-CimInstance -ClassName CIM_SoftwareElementChecks -Property Element |
    Select-Object -Property Element
Phaseuint16read

Indicates whether the referenced check is an in-state check or a next-state check.

Values (2)
ValueLabelDescription
0In-State
1Next-State
Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Phase for each instance
# Lookup table for Phase (values documented by Microsoft)
$phaseName = @{
    0 = 'In-State'
    1 = 'Next-State'
}
Get-CimInstance -ClassName CIM_SoftwareElementChecks -Property Phase |
    Select-Object -Property @(
        @{ Name = 'Phase'; Expression = { $phaseName[[int]$_.Phase] } }
    )

Remarks

WMI does not implement this class. For WMI classes derived from CIM_SoftwareElementChecks, 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

This class has no superclass.

Known subclasses

No known subclass.

Requirements

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

UUID("{24783E8A-DB31-11d2-85FC-0000F8102E5F}") Association Aggregation Abstract 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.