WMI4Java
WMI4Java copied to clipboard
WMI4Java Filters & WMIObject "MDM_DevDetail_Ext01"
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