Application and AD group request
Published: September 21, 2023 - 2:08 PM
Hello everyone,
Here is a query that retrieves all software and their versions for workstations belonging to an AD group.
Here is a query that retrieves all software and their versions for workstations belonging to an AD group.
Code: Select all
SELECT hosts.computer_name, hostsoftwares.name, hostsoftwares.version
FROM hosts
INNER JOIN hostsoftwares ON hosts.uuid = hostsoftwares.host_id
WHERE EXISTS (
SELECT 1
FROM unnest(hosts.computer_ad_groups) AS ad_group
WHERE ad_group ILIKE '%%pouet%%'
)
ORDER BY hosts.computer_name ASC;