/build/static/layout/Breadcrumb_cap_w.png

Duplicate guids for McAfee in Kace report

Hi,

I have a number of machines that have duplicate guids for their McAfee Agent. I've made a custom inventory rule but I want to group the guid and count them up so I can find the duplicate guids and run a script fix on those machines. Is report that can do this? I'm trying to figure out how to do this but I'm grasping at straws at the moment.


0 Comments   [ + ] Show comments

Answers (3)

Posted by: ms01ak 12 years ago
10th Degree Black Belt
2

I've gotten the code to generate the report however it shows groups that have one etnry, I'd like to get rid of those and only show groups that have more then one entry. Here's my sql

 

SELECT IP,MAC,MACHINE.NAME AS SYSTEM_NAME,(SELECT MACHINE_CUSTOM_INVENTORY.STR_FIELD_VALUE FROM MACHINE_CUSTOM_INVENTORY WHERE MACHINE_CUSTOM_INVENTORY.ID=MACHINE.ID AND MACHINE_CUSTOM_INVENTORY.SOFTWARE_ID=44226) AS MACHINE_CUSTOM_INVENTORY_0_44226,(SELECT MACHINE_CUSTOM_INVENTORY.STR_FIELD_VALUE FROM MACHINE_CUSTOM_INVENTORY WHERE MACHINE_CUSTOM_INVENTORY.ID=MACHINE.ID AND MACHINE_CUSTOM_INVENTORY.SOFTWARE_ID=43613) AS MACHINE_CUSTOM_INVENTORY_0_43613 FROM MACHINE    WHERE ((1  in (select 1 from MACHINE_CUSTOM_INVENTORY where MACHINE.ID = MACHINE_CUSTOM_INVENTORY.ID and MACHINE_CUSTOM_INVENTORY.SOFTWARE_ID = 44226 and MACHINE_CUSTOM_INVENTORY.STR_FIELD_VALUE is not null)) )  ORDER BY MACHINE_CUSTOM_INVENTORY_0_44226 desc


Comments:
  • It's hard for me to test this without setting something like this up myself. Can you try adding the "HAVING COUNT" line to the end of this query (2nd to the last line)?

    SELECT IP,MAC,MACHINE.NAME AS SYSTEM_NAME,
    (SELECT MACHINE_CUSTOM_INVENTORY.STR_FIELD_VALUE FROM MACHINE_CUSTOM_INVENTORY WHERE MACHINE_CUSTOM_INVENTORY.ID=MACHINE.ID
    AND MACHINE_CUSTOM_INVENTORY.SOFTWARE_ID=44226) AS MACHINE_CUSTOM_INVENTORY_0_44226,
    (SELECT MACHINE_CUSTOM_INVENTORY.STR_FIELD_VALUE FROM MACHINE_CUSTOM_INVENTORY
    WHERE MACHINE_CUSTOM_INVENTORY.ID=MACHINE.ID AND MACHINE_CUSTOM_INVENTORY.SOFTWARE_ID=43613) AS MACHINE_CUSTOM_INVENTORY_0_43613
    FROM MACHINE
    WHERE ((1 in (select 1 from MACHINE_CUSTOM_INVENTORY where MACHINE.ID = MACHINE_CUSTOM_INVENTORY.ID
    and MACHINE_CUSTOM_INVENTORY.SOFTWARE_ID = 44226 and MACHINE_CUSTOM_INVENTORY.STR_FIELD_VALUE is not null)) )
    HAVING COUNT(MACHINE_CUSTOM_INVENTORY_0_43613) > 1
    ORDER BY MACHINE_CUSTOM_INVENTORY_0_44226 desc - dugullett 12 years ago
    • I just ran this query below on one of my custom inventories. I have a script that returns the Sophos update paths. On our older machines there is just one. On our Win 7 machines there are two update paths. I took out the "is not NULL" to return all results.

      SELECT IP,MAC,M.NAME AS SYSTEM_NAME,
      (SELECT MACHINE_CUSTOM_INVENTORY.STR_FIELD_VALUE FROM MACHINE_CUSTOM_INVENTORY
      WHERE MACHINE_CUSTOM_INVENTORY.ID=M.ID AND MACHINE_CUSTOM_INVENTORY.SOFTWARE_ID=94141) AS SOPHOS
      FROM MACHINE M
      GROUP BY M.NAME
      HAVING COUNT(SOPHOS) > 1
      ORDER BY M.NAME desc

      This returned back all results that had SOPHOS populated. When I changed the HAVING COUNT to "<" it returned all NULL results. You might have better luck, but it looks like it's seeing anything in that field as one result. - dugullett 12 years ago
Posted by: dugullett 12 years ago
Red Belt
1

Something like that can be done using the GUI in Kace. Especially since your custom ID will be different. Try it through there first. If it needs more customization post the SQL code that it generated.

Posted by: SMal.tmcc 12 years ago
Red Belt
-1

I am assuning the guid is in the registry.  If so create a custom software inventory label using RegistryValueEquals(registryPath, valueName, value) and run a report on that label.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ