The Win32_OSRecoveryConfiguration class represents the types of information that will be gathered from memory when the operating system fails. This includes boot failures and system crashes.
One very important parameter is DebugInfoType which sets the type of debugging information written to the log file.
Possible values are:
Value | Meaning |
---|---|
0 |
None |
1 |
Complete Memory Dump |
2 |
Kernel Memory Dump |
3 |
Small Memory Dump |
If we try and change the setting like this
Set-WmiInstance -Class Win32_OSRecoveryConfiguration -Arguments @{DebugInfoType=1}
we get this error
Set-WmiInstance : Unsupported parameter
Lets try running in an elevated prompt. Nope same error
Last chance we EnableAllPrivileges while in an elevated prompt
Nope still get same error
very last chance
Get-WmiObject -Class Win32_OSRecoveryConfiguration -EnableAllPrivileges |
Set-WmiInstance -Arguments @{DebugInfoType=1}
Now that works!!
We have to enable all privileges on the object BEFORE we try and modify it.
If you have a WMI class where you are trying to modify a property and get these errors:
- Try elevated prompt
- Try –EnableAllPrivileges in elevated prompt
- Try Get-WmiObject with –EnableAllPrivileges piped into Set-WmiInstance in an elevated prompt