Hello,
I am trying to inventory the printers....
I have taken on the article https://osd365.com/network-printer-inventory-using-sccm-microsoft-endpoint-configuration-manager/
But in the InventoryAgent.log I have an error:
Collection: Namespace = \.\root\cimv2; Query = SELECT __CLASS, __PATH, __RELPATH, KeyName, DateInventoried, PrinterDriver, PrinterLocation, PrinterPortName, PrinterQueue, PrintProcessor, PrintServer FROM NETWORKPRINTERS; Timeout = 600 secs. InventoryAgent 10/15/2021 1:57:53 PM 20360 (0x4F88)
Unknown error encountered processing an instance of class NETWORKPRINTERS: 80041001 InventoryAgent 10/15/2021 1:57:53 PM 20360 (0x4F88)
The configuration.mof was updated:
//========================
// Added extensions start
//========================
pragma namespace ("\\.\root\cimv2")
pragma deleteclass("NETWORKPRINTERS", NOFAIL)
[dynamic, provider("RegProv"), ClassContext("Local|HKEY_LOCAL_MACHINE\SOFTWARE\SCCMINVENTORY\NETWORKPRINTERS")]
Class NETWORKPRINTERS
{
[key] string KeyName;
[PropertyContext("PrintServer")] String PrintServer;
[PropertyContext("PrinterQueue")] String PrinterQueue;
[PropertyContext("PrinterLocation")] String PrinterLocation;
[PropertyContext("PrinterDriver")] String PrinterDriver;
[PropertyContext("PrintProcessor")] String PrintProcessor;
[PropertyContext("PrinterPortName")] String PrinterPortName;
[PropertyContext("DateInventoried")] String DateInventoried;
};
The import in Client settings was successfully done:

What could be the cause?
Thanks,
Dom