/build/static/layout/Breadcrumb_cap_w.png

Hard Disk SSD

I would like to create a dynamic label that gives me computers with an SSD hard disk


0 Comments   [ + ] Show comments

Answers (2)

Posted by: Nico_K 1 month ago
Red Belt
0

This is really complex since Windows does not really report this.

The only clue may be the name of the media. If all media are named correctly a CIR for all SSD, a CIR for all HDD, a CIR for all NVME would be the way to go.
Some CIR like ShellCommandTextReturn(cmd /c wmic diskdrive get model | findstr NVMe) and then a report over these. 
I tested it on all physical systems (which all have a NVMe built in) and the naming conventions are terrible Samsung has it in the name at the beginning or at the end, Intel in the mid, so a better one is not really possible. But the name could give you a clue.
And your label could then check for the CIR for HDD etc.

Posted by: IgorAngelini 1 month ago
Second Degree Blue Belt
0

I have a blog written in here that might help.


https://www.itninja.com/blog/view/view-and-report-drive-info-and-health-2-methods


Just use method 1 and the SQL query below as a smart label (you will need to change the Custom Inventory ID (in my case 9266) to yours)


SELECT MACHINE.ID AS TOPIC_ID,
       MACHINE.NAME AS SYSTEM_NAME,
       CASE 
       WHEN MACHINE.ID IN (SELECT MACHINE.ID FROM MACHINE LEFT JOIN MACHINE_CUSTOM_INVENTORY MCI ON   MCI.ID = MACHINE.ID
                      WHERE  SUBSTRING(MCI.STR_FIELD_VALUE, 1, 300) NOT LIKE "%MEDIATYPE%:%SSD%"
                     AND    SUBSTRING(MCI.STR_FIELD_VALUE, 1, 300) NOT LIKE "%MEDIATYPE%:%Unspecified%"
                     AND    MCI.SOFTWARE_ID = 9266
                     ) THEN 'HDD'
       WHEN MACHINE.ID IN (SELECT MACHINE.ID FROM MACHINE LEFT JOIN MACHINE_CUSTOM_INVENTORY MCI ON   MCI.ID = MACHINE.ID
                      WHERE  SUBSTRING(MCI.STR_FIELD_VALUE, 1, 300) LIKE "%MEDIATYPE%:%SSD%"
                     AND    SUBSTRING(MCI.STR_FIELD_VALUE, 1, 300) NOT LIKE "%MEDIATYPE%:%Unspecified%"
                     AND    MCI.SOFTWARE_ID = 9266
                     ) THEN 'SSD'
       ELSE "Unspecified"                   
       END AS "MEDIA_TYPE",
       USER.FULL_NAME AS "NOME",
       USER.EMAIL

FROM MACHINE

LEFT JOIN USER
     ON   MACHINE.USER = USER.USER_NAME
LEFT JOIN MACHINE_CUSTOM_INVENTORY MCI
     ON   MCI.ID = MACHINE.ID

WHERE MACHINE.ID IN (SELECT MACHINE.ID FROM MACHINE LEFT JOIN MACHINE_CUSTOM_INVENTORY MCI ON   MCI.ID = MACHINE.ID
                      WHERE  SUBSTRING(MCI.STR_FIELD_VALUE, 1, 300) LIKE "%MEDIATYPE%:%SSD%"
                     AND    SUBSTRING(MCI.STR_FIELD_VALUE, 1, 300) NOT LIKE "%MEDIATYPE%:%Unspecified%"
                     AND    MCI.SOFTWARE_ID = 9266
                     )

 

GROUP BY MACHINE.ID

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