Win32_OSRecoveryConfiguration

Win32 OSRecovery Configuration
root/cimv2dynamickey : Name

The Win32_OSRecoveryConfiguration WMI class represents the types of information that will be gathered from memory when the operating system fails. This includes boot failures and system crashes.

On this page

Main example

List instances

# All instances of Win32_OSRecoveryConfiguration, with the main properties
Get-CimInstance -ClassName Win32_OSRecoveryConfiguration |
    Select-Object -Property Name, Description, AutoReboot, Caption

Examples

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, Caption

The 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, Flags

Properties

15 of 15 properties
NameTypeAccessDescription
AutoRebootbooleanread/write

System will automatically reboot during a recovery operation.

Code
# Value of AutoReboot for each instance
Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Property Name, AutoReboot |
    Select-Object -Property Name, AutoReboot

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

# Warning: changes AutoReboot on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Filter "Name = 'Example'"
$setParameters = @{
    InputObject = $instance
    Property    = @{ AutoReboot = $false }
    WhatIf      = $true  # Remove this line to actually apply the change
}
Set-CimInstance @setParameters
Captionstringread

Short textual description of the current object.

Code
# Value of Caption for each instance
Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Property Name, Caption |
    Select-Object -Property Name, Caption
DebugFilePathstringread/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"

Code
# Value of DebugFilePath for each instance
Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Property Name, DebugFilePath |
    Select-Object -Property Name, DebugFilePath

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

# Warning: changes DebugFilePath on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Filter "Name = 'Example'"
$setParameters = @{
    InputObject = $instance
    Property    = @{ DebugFilePath = 'Example' }
    WhatIf      = $true  # Remove this line to actually apply the change
}
Set-CimInstance @setParameters
DebugInfoTypeuint32read/write

Type of debugging information written to the log file.

Values (4)
ValueLabelDescription
0None
1Complete memory dump
2Kernel memory dump
3Small memory dump
Code
# Value of DebugInfoType for each instance
# 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 -Property Name, DebugInfoType |
    Select-Object -Property @(
        'Name'
        @{ Name = 'DebugInfoType'; Expression = { $debugInfoTypeName[[int]$_.DebugInfoType] } }
    )

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

# Warning: changes DebugInfoType on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Filter "Name = 'Example'"
$setParameters = @{
    InputObject = $instance
    Property    = @{ DebugInfoType = 1 }
    WhatIf      = $true  # Remove this line to actually apply the change
}
Set-CimInstance @setParameters
Descriptionstringread

Textual description of the current object.

Code
# Value of Description for each instance
Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Property Name, Description |
    Select-Object -Property Name, Description
ExpandedDebugFilePathstringread/write

Expanded version of the DebugFilePath property.

Example: "C:\Windows\Memory.dmp"

Code
# Value of ExpandedDebugFilePath for each instance
Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Property Name, ExpandedDebugFilePath |
    Select-Object -Property Name, ExpandedDebugFilePath

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

# Warning: changes ExpandedDebugFilePath on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Filter "Name = 'Example'"
$setParameters = @{
    InputObject = $instance
    Property    = @{ ExpandedDebugFilePath = 'Example' }
    WhatIf      = $true  # Remove this line to actually apply the change
}
Set-CimInstance @setParameters
ExpandedMiniDumpDirectorystringread/write

Expanded version of the MiniDumpDirectory property.

Example: "C:\Windows\MiniDump"

Code
# Value of ExpandedMiniDumpDirectory for each instance
Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Property Name, ExpandedMiniDumpDirectory |
    Select-Object -Property Name, ExpandedMiniDumpDirectory

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

# Warning: changes ExpandedMiniDumpDirectory on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Filter "Name = 'Example'"
$setParameters = @{
    InputObject = $instance
    Property    = @{ ExpandedMiniDumpDirectory = 'Example' }
    WhatIf      = $true  # Remove this line to actually apply the change
}
Set-CimInstance @setParameters
KernelDumpOnlybooleanread/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.

Code
# Value of KernelDumpOnly for each instance
Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Property Name, KernelDumpOnly |
    Select-Object -Property Name, KernelDumpOnly

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

# Warning: changes KernelDumpOnly on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Filter "Name = 'Example'"
$setParameters = @{
    InputObject = $instance
    Property    = @{ KernelDumpOnly = $false }
    WhatIf      = $true  # Remove this line to actually apply the change
}
Set-CimInstance @setParameters
MiniDumpDirectorystringread/write

Directory where small memory dump files will be recorded and accumulated.

Example: "%systemRoot%\MiniDump"

Code
# Value of MiniDumpDirectory for each instance
Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Property Name, MiniDumpDirectory |
    Select-Object -Property Name, MiniDumpDirectory

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

# Warning: changes MiniDumpDirectory on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Filter "Name = 'Example'"
$setParameters = @{
    InputObject = $instance
    Property    = @{ MiniDumpDirectory = 'Example' }
    WhatIf      = $true  # Remove this line to actually apply the change
}
Set-CimInstance @setParameters
Name keystringread

Identifying name for this instance of the Win32_OSRecoveryConfiguration class.

Code
# Value of Name for each instance
Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Property Name |
    Select-Object -Property Name
OverwriteExistingDebugFilebooleanread/write

New debug file will overwrite an existing one.

Code
# Value of OverwriteExistingDebugFile for each instance
Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Property Name, OverwriteExistingDebugFile |
    Select-Object -Property Name, OverwriteExistingDebugFile

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

# Warning: changes OverwriteExistingDebugFile on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Filter "Name = 'Example'"
$setParameters = @{
    InputObject = $instance
    Property    = @{ OverwriteExistingDebugFile = $false }
    WhatIf      = $true  # Remove this line to actually apply the change
}
Set-CimInstance @setParameters
SendAdminAlertbooleanread/write

Alert message will be sent to the system administrator in the event of an operating system failure.

Code
# Value of SendAdminAlert for each instance
Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Property Name, SendAdminAlert |
    Select-Object -Property Name, SendAdminAlert

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

# Warning: changes SendAdminAlert on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Filter "Name = 'Example'"
$setParameters = @{
    InputObject = $instance
    Property    = @{ SendAdminAlert = $false }
    WhatIf      = $true  # Remove this line to actually apply the change
}
Set-CimInstance @setParameters
SettingIDstringread

Identifier by which the current object is known.

Code
# Value of SettingID for each instance
Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Property Name, SettingID |
    Select-Object -Property Name, SettingID
WriteDebugInfobooleanread/write

Debugging information is to be written to a log file.

Code
# Value of WriteDebugInfo for each instance
Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Property Name, WriteDebugInfo |
    Select-Object -Property Name, WriteDebugInfo

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

# Warning: changes WriteDebugInfo on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Filter "Name = 'Example'"
$setParameters = @{
    InputObject = $instance
    Property    = @{ WriteDebugInfo = $false }
    WhatIf      = $true  # Remove this line to actually apply the change
}
Set-CimInstance @setParameters
WriteToSystemLogbooleanread/write

Events will be written to a system log.

Code
# Value of WriteToSystemLog for each instance
Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Property Name, WriteToSystemLog |
    Select-Object -Property Name, WriteToSystemLog

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

# Warning: changes WriteToSystemLog on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_OSRecoveryConfiguration -Filter "Name = 'Example'"
$setParameters = @{
    InputObject = $instance
    Property    = @{ WriteToSystemLog = $false }
    WhatIf      = $true  # Remove this line to actually apply the change
}
Set-CimInstance @setParameters

Remarks

The Win32_OSRecoveryConfiguration class is derived from CIM_Setting.

Inheritance

Superclass chain

  1. CIM_Setting
  2. 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

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.