79462684

Date: 2025-02-24 07:18:52
Score: 0.5
Natty:
Report link

Finally, I found the root causes:

  1. I use the command Get-WmiObject -Namespace "root\acim" -ClassName "HwSetting" | Get-Member to find that the registered method is SetHw(System.String name, System.String value), but it doesn't match my setting of SetHw() which does not have any arguments. So I re-compiled mof by mofcomp.exe.

  2. We must implement GetObjectAsync() when we use a command like this (Get-WmiObject -Namespace "root\acim" -ClassName "MyHwSetting").MySetHw()

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: CodeLamb