__ClassProviderRegistration

Class Provider Registration

Registers class providers in WMI.

On this page

Main example

List instances

# All instances of __ClassProviderRegistration, with the main properties
Get-CimInstance -ClassName __ClassProviderRegistration -Namespace 'root' |
    Select-Object -Property Version, CacheRefreshInterval, InteractionType, PerUserSchema

Examples

Filter with WQL

# WQL filter evaluated by the provider: InteractionType = 0 (Pull)
$cimParameters = @{
    ClassName = '__ClassProviderRegistration'
    Namespace = 'root'
    Filter    = 'InteractionType = 0'
}
Get-CimInstance @cimParameters |
    Select-Object -Property Version, CacheRefreshInterval, InteractionType, PerUserSchema

The filter is evaluated by the WMI provider: less data is transferred than with Where-Object.

Decode numeric values

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

Get-CimInstance -ClassName __ClassProviderRegistration -Namespace 'root' |
    Select-Object -Property @(
        'Version'
        'CacheRefreshInterval'
        @{ Name = 'InteractionType'; Expression = { $interactionTypeName[[int]$_.InteractionType] } }
        'PerUserSchema'
    )

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  = '__ClassProviderRegistration'
        Namespace  = 'root'
    }
    Get-CimInstance @cimParameters |
        Select-Object -Property @(
            'Version'
            'CacheRefreshInterval'
            'InteractionType'
            'PerUserSchema'
        )
} 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 __ClassProviderRegistration -Namespace 'root'
$cimClass.CimClassProperties |
    Select-Object -Property Name, CimType, Flags

Properties

17 of 17 properties
NameTypeAccessDescription
CacheRefreshIntervaldatetimeread/write

Not used.

Code
# Value of CacheRefreshInterval for each instance
# CIM cmdlets already return a DateTime object: no conversion is needed
$cimParameters = @{
    ClassName = '__ClassProviderRegistration'
    Namespace = 'root'
    Property  = 'CacheRefreshInterval'
}
Get-CimInstance @cimParameters |
    Select-Object -Property CacheRefreshInterval

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

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

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

Values (3)
ValueLabelDescription
0PullProvider is a pull provider.
1PushProvider is a push provider.
2PushVerifyProvider is a push-verify provider. Note that **PushVerify** providers are not supported at this time.
Code
# Value of InteractionType for each instance
# Lookup table for InteractionType (values documented by Microsoft)
$interactionTypeName = @{
    0 = 'Pull'
    1 = 'Push'
    2 = 'PushVerify'
}
$cimParameters = @{
    ClassName = '__ClassProviderRegistration'
    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 __ClassProviderRegistration -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
PerUserSchemabooleanread/write

Not used.

Code
# Value of PerUserSchema for each instance
$cimParameters = @{
    ClassName = '__ClassProviderRegistration'
    Namespace = 'root'
    Property  = 'PerUserSchema'
}
Get-CimInstance @cimParameters |
    Select-Object -Property PerUserSchema

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

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

Object path to a class provider. This property is inherited from __ProviderRegistration.

Code
# Value of provider for each instance
$cimParameters = @{
    ClassName = '__ClassProviderRegistration'
    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. This property is inherited from __ObjectProviderRegistration. Class providers are required to support at least one type of query. 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:

Values (4)
ValueLabelDescription
WQL:UnarySelectWQL:UnarySelect
WQL:ReferencesWQL:References
WQL:AssociatorsWQL:Associators
WQL:V1ProviderDefinedWQL:V1ProviderDefined
Code
# Value of QuerySupportLevels for each instance
# QuerySupportLevels is an array: -ExpandProperty returns its items one by one
$cimParameters = @{
    ClassName = '__ClassProviderRegistration'
    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 __ClassProviderRegistration -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
ReferencedSetQueriesstring[]read/write

One or more queries that describe the set of referenced classes that a class provider supports. Providers that can supply association classes must include at least one query in this property.

Code
# Value of ReferencedSetQueries for each instance
# ReferencedSetQueries is an array: -ExpandProperty returns its items one by one
$cimParameters = @{
    ClassName = '__ClassProviderRegistration'
    Namespace = 'root'
    Property  = 'ReferencedSetQueries'
}
Get-CimInstance @cimParameters |
    Select-Object -ExpandProperty ReferencedSetQueries

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

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

One or more queries that describe the set of all classes that can be supplied by the class provider, or a superset of those classes. This property never specifies a subset of supported classes.

Code
# Value of ResultSetQueries for each instance
# ResultSetQueries is an array: -ExpandProperty returns its items one by one
$cimParameters = @{
    ClassName = '__ClassProviderRegistration'
    Namespace = 'root'
    Property  = 'ResultSetQueries'
}
Get-CimInstance @cimParameters |
    Select-Object -ExpandProperty ResultSetQueries

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

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

Not used.

Code
# Value of ReSynchroniseOnNamespaceOpen for each instance
$cimParameters = @{
    ClassName = '__ClassProviderRegistration'
    Namespace = 'root'
    Property  = 'ReSynchroniseOnNamespaceOpen'
}
Get-CimInstance @cimParameters |
    Select-Object -Property ReSynchroniseOnNamespaceOpen

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

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

Not used.

Code
# Value of SupportsBatching for each instance
$cimParameters = @{
    ClassName = '__ClassProviderRegistration'
    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 __ClassProviderRegistration -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. This property is inherited from __ObjectProviderRegistration.

(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
# Value of SupportsDelete for each instance
$cimParameters = @{
    ClassName = '__ClassProviderRegistration'
    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 __ClassProviderRegistration -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. This property is inherited from __ObjectProviderRegistration.

(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
# Value of SupportsEnumeration for each instance
$cimParameters = @{
    ClassName = '__ClassProviderRegistration'
    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 __ClassProviderRegistration -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. This property is inherited from __ObjectProviderRegistration.

(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
# Value of SupportsGet for each instance
$cimParameters = @{
    ClassName = '__ClassProviderRegistration'
    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 __ClassProviderRegistration -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. This property is inherited from __ObjectProviderRegistration.

(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
# Value of SupportsPut for each instance
$cimParameters = @{
    ClassName = '__ClassProviderRegistration'
    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 __ClassProviderRegistration -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
# Value of SupportsTransactions for each instance
$cimParameters = @{
    ClassName = '__ClassProviderRegistration'
    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 __ClassProviderRegistration -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
SuppportsBatchingbooleanread/write

Not used.

Code
# Value of SuppportsBatching for each instance
$cimParameters = @{
    ClassName = '__ClassProviderRegistration'
    Namespace = 'root'
    Property  = 'SuppportsBatching'
}
Get-CimInstance @cimParameters |
    Select-Object -Property SuppportsBatching

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

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

One or more queries that describe the set of classes that the class provider does not support. Use this property to subtract from the set of classes implied by ResultSetQueries.

Code
# Value of UnsupportedQueries for each instance
# UnsupportedQueries is an array: -ExpandProperty returns its items one by one
$cimParameters = @{
    ClassName = '__ClassProviderRegistration'
    Namespace = 'root'
    Property  = 'UnsupportedQueries'
}
Get-CimInstance @cimParameters |
    Select-Object -ExpandProperty UnsupportedQueries

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

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

Version of this class provider.

Code
# Value of Version for each instance
$cimParameters = @{
    ClassName = '__ClassProviderRegistration'
    Namespace = 'root'
    Property  = 'Version'
}
Get-CimInstance @cimParameters |
    Select-Object -Property Version

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

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

Remarks

The __ClassProviderRegistration class is derived from __ObjectProviderRegistration, which is derived from __ProviderRegistration.

The properties inherited from __ObjectProviderRegistration indicate whether or not the class provider supports data retrieval, modification, deletion, enumeration and query processing. The InteractionType property specifies whether or not the class provider is designed as a pull or push provider. For more information, see Determining Push or Pull Status.

The __ProviderRegistration class defines the Provider property. Only administrators can register a provider by creating an instance of __Win32Provider and __ClassProviderRegistration. Only administrators can delete a provider.

Inheritance

Superclass chain

  1. __SystemClass
  2. __ProviderRegistration
  3. __ObjectProviderRegistration
  4. __ClassProviderRegistration

Known subclasses

No known subclass.

Requirements

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

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.