SQL - Agents Completed patching (today)

Useful script s and methods to resolve complicated issues in ConnectWise Automate
Post Reply
User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

SQL - Agents Completed patching (today)

Post by Cubert »

Completed patching (today)

Code: Select all

SELECT DISTINCT computers.computerid AS 'ID',
     computers.name AS 'Patched today',
     clients.name AS 'Client',
     commands.dateupdated AS 'Completed'
FROM commands JOIN computers ON (commands.computerid =
computers.computerid) JOIN clients ON (computers.clientid =
clients.clientid)
WHERE command = 100 AND `status` = 3
AND output LIKE '%downloaded and installed successfully%'
AND commands.dateupdated >=CURDATE()
GROUP BY computers.name
ORDER BY `Completed` DESC

Post Reply

Return to “Scripts”