Report help - missing patches of all devices including Organizational Unit
Hello,
I have a report that lists all missing patches per device. I'm unsure how to add the Active Directory OUs to the SQL query so I can filter devices in a csv file by OU. I don't see an OU option in the "New Report - Wizard' area nor in the tables. I thought including the "Machine Location" table would fix that but all it shows is "NOTPATCHED", so something is really broke there.
Here is my existing query.
SELECT MACHINE.NAME,
PATCH.PUBLISHER,
PATCH.TITLE,
PATCH_MACHINE_STATUS.DETECT_STATUS
MACHINE_LOCATION
FROM (PATCH_MACHINE_STATUS PATCH_MACHINE_STATUS
INNER JOIN KBSYS.PATCH PATCH
ON (PATCH_MACHINE_STATUS.PATCH_ID = PATCH.ID))
INNER JOIN MACHINE MACHINE
ON (PATCH_MACHINE_STATUS.MACHINE_ID = MACHINE.ID)
WHERE (PATCH_MACHINE_STATUS.DETECT_STATUS = 'NOTPATCHED')