Main example
List instances
# All instances of __InstanceProviderRegistration, with the main properties
Get-CimInstance -ClassName __InstanceProviderRegistration -Namespace 'root' |
Select-Object -Property @(
'InteractionType'
'SupportsBatching'
'SupportsDelete'
'SupportsEnumeration'
)Examples
Filter with WQL
# WQL filter evaluated by the provider: InteractionType = 0 (Pull)
$cimParameters = @{
ClassName = '__InstanceProviderRegistration'
Namespace = 'root'
Filter = 'InteractionType = 0'
}
Get-CimInstance @cimParameters |
Select-Object -Property @(
'InteractionType'
'SupportsBatching'
'SupportsDelete'
'SupportsEnumeration'
)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 __InstanceProviderRegistration -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 = '__InstanceProviderRegistration'
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 __InstanceProviderRegistration -Namespace 'root'
$cimClass.CimClassProperties |
Select-Object -Property Name, CimType, FlagsProperties
| Name | Type | Access | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| InteractionType# | sint32 | read/write | Indicates that a class or instance provider supplies data, or retrieves data from 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 use WMI to provide access to it. For more information, see Determining Push or Pull Status. The default value is 0 (zero). Values (3)
CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||||||||
| provider# | __Provider | read | Reference to an instance of __Provider that represents the object path to the instance provider. This property is inherited from __ProviderRegistration. Code | |||||||||||||||
| QuerySupportLevels# | string[] | read/write | Array of the types of provider-included support for query processing. Class providers do not support all types 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. Values (4)
CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||||||||
| SupportsBatching# | boolean | read/write | Not used. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||||||||
| SupportsDelete# | boolean | read/write | If True, the provider supports data deletion. True The provider supports class or instance deletion by implementing 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. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||||||||
| SupportsEnumeration# | boolean | read/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. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||||||||
| SupportsGet# | boolean | read/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. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||||||||
| SupportsPut# | boolean | read/write | If True, the class or instance provider supports data modification. (True) The provider supports class or instance modification by implementing one of the following methods: 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. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||||||||
| SupportsTransactions# | boolean | read/write | Not used. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. |
Remarks
The __InstanceProviderRegistration class is derived from __ObjectProviderRegistration, which is derived from __ProviderRegistration. Only administrators can register an instance provider by creating an instance of __Win32Provider and __InstanceProviderRegistration. Only administrators can delete a provider.
Inheritance
Superclass chain
- __SystemClass
- __ProviderRegistration
- __ObjectProviderRegistration
- __InstanceProviderRegistration
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.