Main example
List instances
# All instances of Win32_ClassicCOMClassSetting, with the main properties
Get-CimInstance -ClassName Win32_ClassicCOMClassSetting |
Select-Object -Property ComponentId, Caption, Description, VersionExamples
Filter with WQL
# WQL filter evaluated by the provider: only the instances where Control is TRUE
Get-CimInstance -ClassName Win32_ClassicCOMClassSetting -Filter 'Control = TRUE' |
Select-Object -Property ComponentId, Caption, Description, VersionThe filter is evaluated by the WMI provider: less data is transferred than with Where-Object.
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 Win32_ClassicCOMClassSetting |
Select-Object -Property ComponentId, Caption, Description, Version
} 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 Win32_ClassicCOMClassSetting
$cimClass.CimClassProperties |
Select-Object -Property Name, CimType, FlagsProperties
| Name | Type | Access | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| AppID# | string | read | Globally unique identifier (GUID) for the COM application using this COM component. Code | ||||||||||||
| AutoConvertToClsid# | string | read | GUID of the COM class to which this COM component will automatically be converted. Code | ||||||||||||
| AutoTreatAsClsid# | string | read | GUID for the COM component that will automatically emulate instances of this class. Code | ||||||||||||
| Caption# | string | read | Short textual description of the current object. Code | ||||||||||||
| ComponentId# key | string | read | GUID of this COM component. Code | ||||||||||||
| Control# | boolean | read | COM component is an OLE control. Code | ||||||||||||
| DefaultIcon# | string | read | Path to the executable file and resource identifier of the default icon used by the class. Code | ||||||||||||
| Description# | string | read | Textual description of the current object. Code | ||||||||||||
| InprocHandler# | string | read | Full path including filename or only filename to a 16-bit custom handler for the COM component. The provider does not always return the full path. Code | ||||||||||||
| InprocHandler32# | string | read | Full path including filename or only filename to a 32-bit custom handler for the COM component. The provider does not always return the full path. Code | ||||||||||||
| InprocServer# | string | read | Full path including filename or only filename to a 16-bit in-process server DLL for this COM component. The provider does not always return the full path. Code | ||||||||||||
| InprocServer32# | string | read | Full path including filename or only filename to a 32-bit in-process server DLL for this COM component. The provider does not always return the full path. Code | ||||||||||||
| Insertable# | boolean | read | COM component can be inserted into OLE container applications. Code | ||||||||||||
| JavaClass# | boolean | read | COM component is a Java component. Code | ||||||||||||
| LocalServer# | string | read | Full path including filename or only filename to a 16-bit local server application. The provider does not always return the full path. Code | ||||||||||||
| LocalServer32# | string | read | Full path including filename or only filename to a 32-bit local server application. The provider does not always return the full path. Code | ||||||||||||
| LongDisplayName# | string | read | Full name of the COM application. It is used in areas such as the Results field of the OLE Paste Special dialog box. Code | ||||||||||||
| ProgId# | string | read | Programmatic identifier associated with the COM component. The format of a ProgID is <Vendor.<Component.<Version. This identifier is not guaranteed to be unique. Code | ||||||||||||
| SettingID# | string | read | Identifier by which the current object is known. Code | ||||||||||||
| ShortDisplayName# | string | read | Short name of the COM application (used in menus and pop-ups). Code | ||||||||||||
| ThreadingModel# | string | read | Threading model used by in-process COM classes. If this property is NULL, then no threading model is used. The component is created on the main thread of the client and calls from other threads are marshaled to this thread. The Apartment model specifies that components may be entered by one and only one thread. Common data held by these types of object servers must be protected against thread collisions because the object server supports multiple components. Each component can be entered simultaneously by different threads. The Free model specifies that components place no restrictions on which threads or how many threads can enter the object. The object cannot contain thread-specific data and must protect its data from simultaneous access by multiple threads. Free-threaded components however, cannot be accessed by apartment threads directly, and calls to them are marshaled across from the client apartment. When Both is specified, components can be used in either apartment-threaded or free-threaded modes. These components can be entered by multiple threads, protect their data from thread collisions, and do not contain thread-specific data. The values are: "Apartment" "Free" "Both" Values (3)
Code | ||||||||||||
| ToolBoxBitmap32# | string | read | Module name and resource identifier for a small (16x16) bitmap used for the face of a toolbar or toolbox button. Used when the COM component is an OLE or ActiveX control. Code | ||||||||||||
| TreatAsClsid# | string | read | GUID of a COM component that can emulate instances of this component. Code | ||||||||||||
| TypeLibraryId# | string | read | GUID for the type library for this COM component. Code | ||||||||||||
| Version# | string | read | Version number of this COM class. Code | ||||||||||||
| VersionIndependentProgId# | string | read | Program identifier that is consistent for all versions of the same program. Code |
Remarks
The Win32_ClassicCOMClassSetting class is derived from Win32_COMSetting.
Inheritance
Superclass chain
- CIM_Setting
- Win32_COMSetting
- Win32_ClassicCOMClassSetting
Known subclasses
No known subclass.
Requirements
- Namespace
- root/cimv2
- Minimum client
- Windows Vista
- Minimum server
- Windows Server 2008
- Provider
- CIMWin32
- MOF file
- CIMWin32.mof
- DLL
- CIMWin32.dll
Class qualifiers
Dynamic Provider("CIMWin32") UUID("{E5D8A562-F6C0-11d2-B35E-00105A1F8569}") AMENDMENT
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.