Main example
List instances
# All instances of __ProviderHostQuotaConfiguration, with the main properties
Get-CimInstance -ClassName __ProviderHostQuotaConfiguration -Namespace 'root' |
Select-Object -Property @(
'HandlesPerHost'
@{ Name = 'MemoryAllHostsGB'; Expression = { [math]::Round($_.MemoryAllHosts / 1GB, 2) } }
'MemoryPerHost'
'ProcessLimitAllHosts'
)Examples
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 = '__ProviderHostQuotaConfiguration'
Namespace = 'root'
}
Get-CimInstance @cimParameters |
Select-Object -Property @(
'HandlesPerHost'
@{ Name = 'MemoryAllHostsGB'; Expression = { [math]::Round($_.MemoryAllHosts / 1GB, 2) } }
'MemoryPerHost'
'ProcessLimitAllHosts'
)
} 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 __ProviderHostQuotaConfiguration -Namespace 'root'
$cimClass.CimClassProperties |
Select-Object -Property Name, CimType, FlagsProperties
| Name | Type | Access | Description |
|---|---|---|---|
| HandlesPerHost# | uint32 | read/write | Number of kernel object handles each host can have. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. |
| MemoryAllHosts# | uint64 | read/write | Combined amount of private memory in bytes that can be held by all hosts. For more information about using uint64 values in scripts, see Scripting in WMI. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. |
| MemoryPerHost# | uint64 | read/write | Amount of private memory that can be held by each host. For more information about using uint64 values in scripts, see Scripting in WMI. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. |
| ProcessLimitAllHosts# | uint32 | read/write | Total number of host processes that can be executing concurrently. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. |
| ThreadsPerHost# | uint32 | read/write | Number of threads owned by any one host. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. |
Remarks
The properties that represent limits can be changed but because the class is a singleton, all the provider hosts share the same limits.
The following parameters are used when configuring the job object limits for the host job object:
- MemoryAllHosts
- MemoryPerHost
- ProcessLimitAllHosts
- ThreadsPerHost
The host process polls handle usage and exits the process if the HandlesPerHost quota is violated. Changes to these values take effect after the computer is restarted.
Inheritance
Superclass chain
- __SystemClass
- __ProviderHostQuotaConfiguration
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.