WMI Methods

This topic contains 4 replies, has 4 voices, and was last updated by Profile photo of Richard Siddaway Richard Siddaway 3 years, 9 months ago.

  • Author
    Posts
  • #9544
    Profile photo of Lery
    Lery
    Participant

    I'm working with WMI today. The class I'm working with only exists if you're using a third party software. Obviously you guys reading this will not be using that. I'm having a problem listing the available methods for the class.

    First, I use the old Sapien Technologies WMI Explorer. When I click on the class, I can see 10 methods listed under the methods tab.

    Second, I use the new Sapien Technologies WMI Explorer. When I click on the same class, I can only see one method listed. Compared to 10 in the first option.

    Third, I use PowerShell. I do a get-wmiobject -namespace root\cimv2 -class softwarevendor | get-member. When I run that I get just the properties back and no methods. I even tried get-wmiobject -namespace root\cimv2 -class softwarevendor | get-member -membertype method. When I do that, no results returned.

    I suppose I should discuss my first and second results with Sapien Technologies. However, when I used just PowerShell it really threw me off. So I thought I would check here first. If anyone has any ideas please let me know.

  • #9545
    Profile photo of Rob Simmers
    Rob Simmers
    Participant

    Are running your Powershell console in Admin context (i.e. Run As Administrator)? Outside of trying that to see if there are some permissions issues, you'll have to look at the documentation provided by the vendor or contact them for support.

  • #9552
    Profile photo of Lery
    Lery
    Participant

    [quote=9545]Are running your Powershell console in Admin context (i.e. Run As Administrator)? Outside of trying that to see if there are some permissions issues, you’ll have to look at the documentation provided by the vendor or contact them for support.[/quote]

    Yup, running as administrator. I compared the vendors classes to some of the more well known ones, like win32_service and all that looks like what I'm used to seeing. So I think this might be related to the vendor and nothing more. Damn software vendors! 🙂

  • #9987
    Profile photo of Alexander Riedel
    Alexander Riedel
    Participant

    The new WMI Explorer was only showing methods defined by the class itself, not inherited ones.
    This has been remedied and a new build of the new WMI Explorer is available.
    Just download and install again.

  • #9988
    Profile photo of Richard Siddaway
    Richard Siddaway
    Moderator

    If you have PowerShell 3.0 available try running Get-CimClass against the WMI class. Be interesting to see what is returned

You must be logged in to reply to this topic.