You are not logged in.
I'm trying to collect info from host by WMI, i try a simply request and this work fine for example:
moniker = winmgmts:/root/CIMV2
class = Win32_LogicalDisk
properties = Name
to get a specific properties from folder and i set this:
moniker = winmgmts:/root/CIMV2:Win32_Directory='C:\\System Volume Information'
class = Win32_Directory
properties = CreationDate
I get error:
Win32::OLE ERROR: Win32::OLE(0.1713) error 0x80020003: "Impossibile trovare membro" in METHOD/PROPERTYGET ""
Same code used in VBS works fine.
I don't know what i'm doing wrong.
(I need to know when the disk/parition was formatted and i found you can retive the information by get the creation date of C:\\System Volume Information folder)
Offline
Hi achilleb
I see 2 problems with your try related to the Collect task:
1. You want to select one object, the one with the path 'C:\\System Volume Information'. The collect task was not develop to support filtering, so it will run on all objects of the class you're requesting.
2. The CreationDate property type is DateTime, and this is actually not supported. I didn't tested but you'll probably obtain a not readable string.
With such a problem, you probably want to run a dedicated script which will update a value in registry and use collect task to request that registry value.
GLPI-Agent developer from Teclib' and GLPI-Network team
Previously FusionInventory-Agent maintainer
Offline
I suspected the collector not support filtering and without that the WMI return all directory (it go timeout) and the return value is like 20200628164132.654955+120 so finally i decided to deploy a script to store value in registy and collect it after as your solution.
Thanks for the help!
Last edited by achilleb (2023-03-30 16:05:42)
Offline