.Put method for WMI invalid class error

Welcome Forums General PowerShell Q&A .Put method for WMI invalid class error

Viewing 2 reply threads
  • Author
    Posts
    • #226752
      Participant
      Topics: 1
      Replies: 1
      Points: 21
      Rank: Member

      This should actually be simple, but for some reason it fails.

      I read a WMI class:

      Displaying WmiProp I get this:

      I modify the ScriptExecutionTimeOut property:

      And try to write it back:

      And I get this:

      I also tried to pipe Get-WmiObject to Set-WmiInstance. Exactly the same error.

      I was able to modify just fine other WMI properties. But this one gives me this strange error. I’m out if ideas…

      I also tried with wmic. Exactly the same error.

      Any idea is more than welcome.

       

    • #226755
      Participant
      Topics: 7
      Replies: 2458
      Points: 6,439
      Helping Hand
      Rank: Community MVP

      May I ask what you’re actually trying to accomplish? There might be a better way.

    • #226764
      Participant
      Topics: 1
      Replies: 1
      Points: 21
      Rank: Member

      Trying to set the script execution timeout for the SCCM client.

      But never mind, I think I found the problem.

      It seems that the correct path to the property was: \\root\ccm\policy\machine\actualconfig

      The class appears in \\root\ccm\policy\machine but cannot be set from there (for some reason). But if I add the \actualconfig I can set the property and it appears as changed in \root\ccm\policy\machine also.

       

Viewing 2 reply threads
  • The topic ‘.Put method for WMI invalid class error’ is closed to new replies.