Main example
List instances
# All instances of __FilterToConsumerBinding, with the main properties
Get-CimInstance -ClassName __FilterToConsumerBinding -Namespace 'root' |
Select-Object -Property @(
'DeliverSynchronously'
'DeliveryQoS'
'MaintainSecurityContext'
'SlowDownProviders'
)Examples
Filter with WQL
# WQL filter evaluated by the provider: DeliveryQoS = 0 (WMIMSG_FLAG_QOS_SYNCHRONOUS)
$cimParameters = @{
ClassName = '__FilterToConsumerBinding'
Namespace = 'root'
Filter = 'DeliveryQoS = 0'
}
Get-CimInstance @cimParameters |
Select-Object -Property @(
'DeliverSynchronously'
'DeliveryQoS'
'MaintainSecurityContext'
'SlowDownProviders'
)The filter is evaluated by the WMI provider: less data is transferred than with Where-Object.
Decode numeric values
# Lookup table for DeliveryQoS (values documented by Microsoft)
$deliveryQoSName = @{
0 = 'WMIMSG_FLAG_QOS_SYNCHRONOUS'
1 = 'WMIMSG_FLAG_QOS_EXPRESS'
}
Get-CimInstance -ClassName __FilterToConsumerBinding -Namespace 'root' |
Select-Object -Property @(
'DeliverSynchronously'
@{ Name = 'DeliveryQoS'; Expression = { $deliveryQoSName[[int]$_.DeliveryQoS] } }
'MaintainSecurityContext'
'SlowDownProviders'
)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 = '__FilterToConsumerBinding'
Namespace = 'root'
}
Get-CimInstance @cimParameters |
Select-Object -Property @(
'DeliverSynchronously'
'DeliveryQoS'
'MaintainSecurityContext'
'SlowDownProviders'
)
} 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 __FilterToConsumerBinding -Namespace 'root'
$cimClass.CimClassProperties |
Select-Object -Property Name, CimType, FlagsProperties
| Name | Type | Access | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Consumer# key | __EventConsumer | read/write | Reference to an instance of __EventConsumer that represents the object path to a logical consumer, the recipient of an event. A logical consumer is an instance of a class derived from __EventConsumer. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||
| CreatorSID# | uint8[] | read/write | Security identifier (SID) that uniquely identifies the user who created the binding. Depending on the operating system, WMI stores the Administrator SID or the SID of the user that creates an instance of __FilterToConsumerBinding. For more information, see Binding an Event Filter with a Logical Consumer and Monitoring and Responding to Events with Standard Consumers. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||
| DeliverSynchronously# | boolean | read/write | Obsolete. Instead use the DeliveryQoS property in place of this property, because if DeliverSynchronously is set to True it overrides the setting of the DeliveryQoS property. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||
| DeliveryQoS# | uint32 | read/write | Quality of service for a subscription. If the DeliverSynchronously property is set to True, it overrides the setting of the DeliveryQoS property. Values (2)
CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||
| Filter# key | __EventFilter | read/write | Reference to an instance of __EventFilter that represents the object path to an event filter which is a query that specifies the type of event to be received. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||
| MaintainSecurityContext# | boolean | read/write | If True, the events are delivered in the same security context that the provider was in when it provided them. Note: Only a consumer implemented as a DLL (an in-process consumer) can receive events in the security context of the provider. For more information about in-process providers and security, see Provider Hosting and Security. For more information and examples, see Receiving Events Securely. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||
| SlowDownProviders# | boolean | read/write | If True, providers are slowed down if this consumer cannot keep up. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. |
Remarks
The __FilterToConsumerBinding class is derived from __IndicationRelated, which has no properties.
Permanent event consumers use the __FilterToConsumerBinding system class to bind event filters to final consumers. After the filter and consumer are bound together, WMI can forward events that match the filter to the corresponding consumer.
Inheritance
Superclass chain
- __SystemClass
- __IndicationRelated
- __FilterToConsumerBinding
Known subclasses
No known subclass.
Requirements
- Namespace
- root
- Minimum client
- Windows Vista
- Minimum server
- Windows Server 2008
- DLL
- All
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.