Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WMI4Java Filters & WMIObject "MDM_DevDetail_Ext01" #20

Open
ReneKofler opened this issue Nov 28, 2022 · 0 comments
Open

WMI4Java Filters & WMIObject "MDM_DevDetail_Ext01" #20

ReneKofler opened this issue Nov 28, 2022 · 0 comments

Comments

@ReneKofler
Copy link

Hi @profesorfalken ,
I have 2 Problems with following example:

  • the 4k Hash is only 100 characters long
  • I cannot get the filters to work :(

here is my code

String hash= WMI4Java.get()
                .namespace("root/cimv2/mdm/dmmap")
                .filters(Arrays.asList("InstanceID -eq \"Ext\"","ParentID -eq \"./DevDetail\""))
                .getWMIObject("MDM_DevDetail_Ext01")
                .get("DeviceHardwareData");

If I leave out the filters it still works on my machine but with a reduced hashKey.
I also tried the filters in various ways e.g.
.filters(Arrays.asList("InstanceID='Ext'","ParentID='./DevDetail'"))

The hashkey seems to work with getRawWMIObjectOutput, but then I have to do the parsing myself.

Since this command only works on elevated Powershell, it is not that easy to test, since I cannot debug it.
Can I elevate the internally used JPowershell as well?

Thanks,
Rene

@ReneKofler ReneKofler changed the title MDM_DevDetail_Ext01 WMI4Java Filters & WMIObject "MDM_DevDetail_Ext01" Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant