Report showing Office versions installed
Hi! I'm not familiar enough with SQL to create this on my own, and I found another post on this site that has almost exactly what I need.
That post can be found here: http://www.itninja.com/blog/view/how-to-show-how-many-office-installs-and-what-version-of-office-per-site
The SQL there is just missing something that lets me determine the device name. The SQL in that post works perfectly, however it brings back the results from my entire organization. I only need it for specific devices, in particular ones that start with certain letters/numbers. For instance, devices that start with G1A or G1B. Can someone help me modify this SQL to include that kind of variable? Thanks in advance!
SELECT MACHINE.NAME AS 'COMPUTER NAME', MACHINE.IP AS 'IP', SAM_VIEW_DISCOVERED_SUITES.NAME AS 'SOFTWARE',
CASE WHEN MACHINE.IP LIKE '192.168.0.%' THEN 'OFFICE 1'
WHEN MACHINE.IP LIKE '192.168.1.%' THEN 'OFFICE 2'
WHEN MACHINE.IP LIKE '192.168.2.%' THEN 'OFFICE 3'
END AS LOCATION
LEFT JOIN SAM_VIEW_MACHINE_DISCOVERED_SOFTWARE ON SAM_VIEW_DISCOVERED_SUITES.ID = SAM_VIEW_MACHINE_DISCOVERED_SOFTWARE.ID
LEFT JOIN MACHINE ON MACHINE.ID = SAM_VIEW_MACHINE_DISCOVERED_SOFTWARE.MACHINE_ID
WHERE SAM_VIEW_DISCOVERED_SUITES.NAME like '%office%'
Please log in to answer
Posted by: chucksteel 3 years ago