Main example
List instances
# All instances of __CIMOMIdentification, with the main properties
Get-CimInstance -ClassName __CIMOMIdentification -Namespace 'root' |
Select-Object -Property @(
'SetupDateTime'
'VersionCurrentlyRunning'
'VersionUsedToCreateDB'
'WorkingDirectory'
)Singleton class: only one instance exists.
Examples
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 {
$cimParameters = @{
CimSession = $cimSession
ClassName = '__CIMOMIdentification'
Namespace = 'root'
}
Get-CimInstance @cimParameters |
Select-Object -Property @(
'SetupDateTime'
'VersionCurrentlyRunning'
'VersionUsedToCreateDB'
'WorkingDirectory'
)
} 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 __CIMOMIdentification -Namespace 'root'
$cimClass.CimClassProperties |
Select-Object -Property Name, CimType, FlagsProperties
| Name | Type | Access | Description |
|---|---|---|---|
| SetupDateTime# | string | read | Date and time of installation. This property is empty after the operating system is installed for the first time. If the WMI repository has been deleted and then created again, this property contains the date and time that the repository is created again. Code |
| VersionCurrentlyRunning# | string | read | Indicates the version of the actual image containing the WMI service that created the Common Information Model (CIM) repository. Because the repository format may change between versions of WMI, this property allows future WMI upgrades to determine whether the database must be upgraded. The format is: "1.00.183.0000" where the first digit is the major version, the next two digits are minor versions, and the next three digits are the build number. The remaining digits are not used. Code |
| VersionUsedToCreateDB# | string | read | Indicates the version of the actual image containing the WMI service that created the CIM repository. Because the repository format may change between versions of WMI, this property allows future WMI upgrades to determine whether the database must be upgraded. The format is: "1.00.183.0000" where the first digit is the major version, the next two digits are minor versions, and the next three digits are the build number. The remaining digits are not used. Code |
| WorkingDirectory# | string | read | Installation directory. Code |
Remarks
The __CIMOMIdentification class is derived from __SystemClass, which has no properties.
Inheritance
Superclass chain
- __SystemClass
- __CIMOMIdentification
Known subclasses
No known subclass.
Requirements
- Namespace
- root
- Minimum client
- Windows Vista
- Minimum server
- Windows Server 2008
- DLL
- Root
Class qualifiers
singleton
Microsoft source
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.