__ObjectProviderRegistration

Object Provider Registration
rootabstract

Serves as the parent class for classes that are used to register class and instance providers in WMI.

On this page

Main example

List instances

# Abstract class: Get-CimInstance returns the instances of its subclasses
Get-CimInstance -ClassName __ObjectProviderRegistration -Namespace 'root' |
    Select-Object -Property @(
        'InteractionType'
        'SupportsBatching'
        'SupportsDelete'
        'SupportsEnumeration'
    )

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

Examples

Decode numeric values

# Lookup table for InteractionType (values documented by Microsoft)
$interactionTypeName = @{
    0 = 'Pull'
    1 = 'Push'
    2 = 'PushVerify'
}

Get-CimInstance -ClassName __ObjectProviderRegistration -Namespace 'root' |
    Select-Object -Property @(
        @{ Name = 'InteractionType'; Expression = { $interactionTypeName[[int]$_.InteractionType] } }
        'SupportsBatching'
        'SupportsDelete'
        'SupportsEnumeration'
    )

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  = '__ObjectProviderRegistration'
        Namespace  = 'root'
    }
    Get-CimInstance @cimParameters |
        Select-Object -Property @(
            'InteractionType'
            'SupportsBatching'
            'SupportsDelete'
            'SupportsEnumeration'
        )
} 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 __ObjectProviderRegistration -Namespace 'root'
$cimClass.CimClassProperties |
    Select-Object -Property Name, CimType, Flags

Properties

9 of 9 properties
NameTypeAccessDescription
InteractionTypesint32read/write

Indicates whether or not the class or instance provider supplies its own data, or relies on WMI and the Common Information Model (CIM) repository. Pull providers support dynamic access to their data, and push providers store their data in the CIM repository, and rely on WMI to provide access to it. For more information, see Determining Push or Pull Status. The default value is 0 (zero).

Values (3)
ValueLabelDescription
0PullProvider is a pull provider.
1PushProvider is a push provider.
2PushVerifyProvider is a push-verify provider. Note that push-verify is not supported at this time.
Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of InteractionType for each instance
# Lookup table for InteractionType (values documented by Microsoft)
$interactionTypeName = @{
    0 = 'Pull'
    1 = 'Push'
    2 = 'PushVerify'
}
$cimParameters = @{
    ClassName = '__ObjectProviderRegistration'
    Namespace = 'root'
    Property  = 'InteractionType'
}
Get-CimInstance @cimParameters |
    Select-Object -Property @(
        @{ Name = 'InteractionType'; Expression = { $interactionTypeName[[int]$_.InteractionType] } }
    )

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

# Warning: changes InteractionType on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName __ObjectProviderRegistration -Namespace 'root' |
    Select-Object -First 1
$setParameters = @{
    InputObject = $instance
    Property    = @{ InteractionType = 0 }
    WhatIf      = $true  # Remove this line to actually apply the change
}
Set-CimInstance @setParameters
provider__Providerread

Reference to an instance of __Provider that represents an object path to the object provider. This property is inherited from __ProviderRegistration.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of provider for each instance
$cimParameters = @{
    ClassName = '__ObjectProviderRegistration'
    Namespace = 'root'
    Property  = 'provider'
}
Get-CimInstance @cimParameters |
    Select-Object -Property provider
QuerySupportLevelsstring[]read/write

Array of the types of provider-included support for query processing. Class providers do not support any type of queries. Instance providers can set QuerySupportLevels to NULL if they do not support query processing. Providers that support queries implement the IWbemServices::ExecQueryAsync method, and set this property to one or more of the following values (the property type is an array).

"WQL:UnarySelect"

"WQL:References"

"WQL:Associators"

"WQL:V1ProviderDefined"

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of QuerySupportLevels for each instance
# QuerySupportLevels is an array: -ExpandProperty returns its items one by one
$cimParameters = @{
    ClassName = '__ObjectProviderRegistration'
    Namespace = 'root'
    Property  = 'QuerySupportLevels'
}
Get-CimInstance @cimParameters |
    Select-Object -ExpandProperty QuerySupportLevels

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

# Warning: changes QuerySupportLevels on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName __ObjectProviderRegistration -Namespace 'root' |
    Select-Object -First 1
$setParameters = @{
    InputObject = $instance
    Property    = @{ QuerySupportLevels = @('Example') }
    WhatIf      = $true  # Remove this line to actually apply the change
}
Set-CimInstance @setParameters
SupportsBatchingbooleanread/write

Not used.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of SupportsBatching for each instance
$cimParameters = @{
    ClassName = '__ObjectProviderRegistration'
    Namespace = 'root'
    Property  = 'SupportsBatching'
}
Get-CimInstance @cimParameters |
    Select-Object -Property SupportsBatching

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

# Warning: changes SupportsBatching on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName __ObjectProviderRegistration -Namespace 'root' |
    Select-Object -First 1
$setParameters = @{
    InputObject = $instance
    Property    = @{ SupportsBatching = $false }
    WhatIf      = $true  # Remove this line to actually apply the change
}
Set-CimInstance @setParameters
SupportsDeletebooleanread/write

If True, the provider supports data deletion.

True

The provider supports class or instance deletion by implementing one of either IWbemServices::DeleteClassAsync (class providers), or IWbemServices::DeleteInstanceAsync (instance providers).

False

The provider does not support data deletion, and returns WBEM_E_PROVIDER_NOT_CAPABLE from DeleteClassAsync or DeleteInstanceAsync.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of SupportsDelete for each instance
$cimParameters = @{
    ClassName = '__ObjectProviderRegistration'
    Namespace = 'root'
    Property  = 'SupportsDelete'
}
Get-CimInstance @cimParameters |
    Select-Object -Property SupportsDelete

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

# Warning: changes SupportsDelete on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName __ObjectProviderRegistration -Namespace 'root' |
    Select-Object -First 1
$setParameters = @{
    InputObject = $instance
    Property    = @{ SupportsDelete = $false }
    WhatIf      = $true  # Remove this line to actually apply the change
}
Set-CimInstance @setParameters
SupportsEnumerationbooleanread/write

If True, the provider supports data enumeration.

True

The provider supports data enumeration by implementing one of either IWbemServices::CreateClassEnumAsync (class providers), or IWbemServices::CreateInstanceEnumAsync (instance providers).

False

The provider does not support data enumeration, and returns WBEM_E_PROVIDER_NOT_CAPABLE from CreateClassEnumAsync or CreateInstanceEnumAsync.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of SupportsEnumeration for each instance
$cimParameters = @{
    ClassName = '__ObjectProviderRegistration'
    Namespace = 'root'
    Property  = 'SupportsEnumeration'
}
Get-CimInstance @cimParameters |
    Select-Object -Property SupportsEnumeration

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

# Warning: changes SupportsEnumeration on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName __ObjectProviderRegistration -Namespace 'root' |
    Select-Object -First 1
$setParameters = @{
    InputObject = $instance
    Property    = @{ SupportsEnumeration = $false }
    WhatIf      = $true  # Remove this line to actually apply the change
}
Set-CimInstance @setParameters
SupportsGetbooleanread/write

If True, the class or instance provider supports data retrieval.

True

The provider supports data retrieval by implementing IWbemServices::GetObjectAsync.

False

The provider does not support data retrieval, and returns WBEM_E_PROVIDER_NOT_CAPABLE from GetObjectAsync.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of SupportsGet for each instance
$cimParameters = @{
    ClassName = '__ObjectProviderRegistration'
    Namespace = 'root'
    Property  = 'SupportsGet'
}
Get-CimInstance @cimParameters |
    Select-Object -Property SupportsGet

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

# Warning: changes SupportsGet on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName __ObjectProviderRegistration -Namespace 'root' |
    Select-Object -First 1
$setParameters = @{
    InputObject = $instance
    Property    = @{ SupportsGet = $false }
    WhatIf      = $true  # Remove this line to actually apply the change
}
Set-CimInstance @setParameters
SupportsPutbooleanread/write

If True, the class or instance provider supports data modification.

True

The provider supports class or instance modification by implementing one of either IWbemServices::PutClassAsync (class providers), or IWbemServices::PutInstanceAsync (class providers).

False

The provider does not support data modification and returns WBEM_E_PROVIDER_NOT_CAPABLE from PutClassAsync or PutInstanceAsync.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of SupportsPut for each instance
$cimParameters = @{
    ClassName = '__ObjectProviderRegistration'
    Namespace = 'root'
    Property  = 'SupportsPut'
}
Get-CimInstance @cimParameters |
    Select-Object -Property SupportsPut

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

# Warning: changes SupportsPut on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName __ObjectProviderRegistration -Namespace 'root' |
    Select-Object -First 1
$setParameters = @{
    InputObject = $instance
    Property    = @{ SupportsPut = $false }
    WhatIf      = $true  # Remove this line to actually apply the change
}
Set-CimInstance @setParameters
SupportsTransactionsbooleanread/write

Not used.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of SupportsTransactions for each instance
$cimParameters = @{
    ClassName = '__ObjectProviderRegistration'
    Namespace = 'root'
    Property  = 'SupportsTransactions'
}
Get-CimInstance @cimParameters |
    Select-Object -Property SupportsTransactions

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

# Warning: changes SupportsTransactions on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName __ObjectProviderRegistration -Namespace 'root' |
    Select-Object -First 1
$setParameters = @{
    InputObject = $instance
    Property    = @{ SupportsTransactions = $false }
    WhatIf      = $true  # Remove this line to actually apply the change
}
Set-CimInstance @setParameters

Remarks

The __ObjectProviderRegistration class is derived from __ProviderRegistration.

Class providers must set the SupportsEnumeration property to True because the providers must be able to supply WMI with a list of their classes. If a class provider attempts to set this property to False, WMI flags the registration as illegal. Instance providers are not required to support enumeration, and can choose to set SupportsEnumeration to either True or False.

A provider that sets QuerySupportLevels to "WQL:UnarySelect" can accept a query that consists of the basic SELECT statement as supported in WMI version 1.0. Both class and instance providers are expected to be able to handle the __CLASS system property. Class providers are also expected to process the __SUPERCLASS system property and the ISA operator. The ISA operator is used to expand a result set to derived classes. If a provider is given a query that it cannot interpret, it requests that WMI handle it by returning the WBEM_E_TOO_COMPLEX error value. For a description of valid WQL syntax, see Querying with WQL.

A provider that sets QuerySupportLevels to WQL:V1ProviderDefined can try to support a larger set of the SQL syntax at its own risk, such as the ORDER BY clause. WMI does not interpret the additional clauses, or attempt to ensure that the result set is correct.

Only administrators can register or delete a provider by creating an instance of __Win32Provider and registering it.

Inheritance

Superclass chain

  1. __SystemClass
  2. __ProviderRegistration
  3. __ObjectProviderRegistration

Known subclasses

Requirements

Namespace
root
Minimum client
Windows Vista
Minimum server
Windows Server 2008
DLL
All
Class qualifiers

abstract

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.