Main example
List instances
# All instances of Win32_OSRecoveryConfiguration, with the main properties
Get-CimInstance -ClassName Win32_OSRecoveryConfiguration |
Select-Object -Property Name, Description, AutoReboot, CaptionExamples
Filter with WQL
# WQL filter evaluated by the provider: DebugInfoType = 1 (Complete memory dump)
Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Filter 'DebugInfoType = 1' |
Select-Object -Property Name, Description, AutoReboot, CaptionThe filter is evaluated by the WMI provider: less data is transferred than with Where-Object.
Decode numeric values
# Lookup table for DebugInfoType (values documented by Microsoft)
$debugInfoTypeName = @{
0 = 'None'
1 = 'Complete memory dump'
2 = 'Kernel memory dump'
3 = 'Small memory dump'
}
Get-CimInstance -ClassName Win32_OSRecoveryConfiguration |
Select-Object -Property @(
'Name'
'Description'
'AutoReboot'
'Caption'
@{ Name = 'DebugInfoType'; Expression = { $debugInfoTypeName[[int]$_.DebugInfoType] } }
)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 {
Get-CimInstance -CimSession $cimSession -ClassName Win32_OSRecoveryConfiguration |
Select-Object -Property Name, Description, AutoReboot, Caption
} 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 Win32_OSRecoveryConfiguration
$cimClass.CimClassProperties |
Select-Object -Property Name, CimType, FlagsProperties
| Name | Type | Access | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| AutoReboot# | boolean | read/write | System will automatically reboot during a recovery operation. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||||||||
| Caption# | string | read | Short textual description of the current object. Code | |||||||||||||||
| DebugFilePath# | string | read/write | Full path to the debug file. A debug file is created with the memory state of the computer after a computer failure. Example: "C:\Windows\Memory.dmp" CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||||||||
| DebugInfoType# | uint32 | read/write | Type of debugging information written to the log file. Values (4)
CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||||||||
| Description# | string | read | Textual description of the current object. Code | |||||||||||||||
| ExpandedDebugFilePath# | string | read/write | Expanded version of the DebugFilePath property. Example: "C:\Windows\Memory.dmp" CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||||||||
| ExpandedMiniDumpDirectory# | string | read/write | Expanded version of the MiniDumpDirectory property. Example: "C:\Windows\MiniDump" CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||||||||
| KernelDumpOnly# | boolean | read/write | Only kernel debug information will be written to the debug log file. If TRUE, then only the state of the kernel is written to a file in the event of a system failure. If FALSE, the system will try to log the state of the memory, and any devices that can provide information about the system when it failed. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||||||||
| MiniDumpDirectory# | string | read/write | Directory where small memory dump files will be recorded and accumulated. Example: "%systemRoot%\MiniDump" CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||||||||
| Name# key | string | read | Identifying name for this instance of the Win32_OSRecoveryConfiguration class. Code | |||||||||||||||
| OverwriteExistingDebugFile# | boolean | read/write | New debug file will overwrite an existing one. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||||||||
| SendAdminAlert# | boolean | read/write | Alert message will be sent to the system administrator in the event of an operating system failure. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||||||||
| SettingID# | string | read | Identifier by which the current object is known. Code | |||||||||||||||
| WriteDebugInfo# | boolean | read/write | Debugging information is to be written to a log file. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||||||||
| WriteToSystemLog# | boolean | read/write | Events will be written to a system log. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. |
Remarks
The Win32_OSRecoveryConfiguration class is derived from CIM_Setting.
Inheritance
Superclass chain
- CIM_Setting
- Win32_OSRecoveryConfiguration
Known subclasses
No known subclass.
Requirements
- Namespace
- root/cimv2
- Minimum client
- Windows Vista
- Minimum server
- Windows Server 2008
- Provider
- CIMWin32
- MOF file
- CIMWin32.mof
- DLL
- CIMWin32.dll
Class qualifiers
Dynamic Provider("CIMWin32") SupportsUpdate UUID("{8502C4E8-5FBB-11D2-AAC1-006008C78BC7}") AMENDMENT
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.