I could have sworn at one point that I has an SQL script that was provided by support to do this, but I can't seem to find it now.
Does anyone know a quick method to show *all* pending procedures across all agents, that were scheduled by a specific admin? Especially re-curring procedures.
There are several reasons why this might be handy to have, however the current issue I'm fighting is a bit of a bug IMHO.
*Supposedly* when you remove an admin, all of their procedures, etc are all "reassigned" to the admin who deletes their account, and for the most part I've found this to be true. However we recently had one of our employees leave who has been here since day 1 of Kaseya VSA implementation and was my co-system admin. I removed his user, and everything *seemed* to be ok, however now I'm finding that it seems at least *some* of the re-curring procedures that he had previously had scheduled do not appear to be working at all.
For example I have one machine for a customer where I had a weekly reboot procedure scheduled on a server. If I look in pending procedures for that machine it still shows me the procedure there scheduled for a "weekly" repeat with the next scheduled time of 3:15am on 19-Feb-18, and that it was scheduled by the previous admin...Meaning that it *should* have also run at 3:15am on February 12th. However the last reboot time for the server is almost a month ago, and if I look in the procedure log/procedure history for that machine, it doesn't show any entries for this weekly reboot procedure having run since I removed his admin user a couple of months ago. (Mid November)
In fact if I go specifically locate the exact procedure that he had scheduled, it shows me this.
So it basically has just been completely skipping this script ever since I removed his admin user. I've pretty much confirmed that I can fix the issue by cancelling the schedule he had created and recreating it myself, however I *know* about it happening with this machine, I really need to find a way to determine where else this might be happening.
you can go to agent procedures under schedule/create. in there click the procedure that was scheduled. you can also hover over the user and go to pending, history or log. as for who scheduled it go to agent procedure status and click on the user.
Yeah that gives you for any *one* procedure, but I want to know *all* procedures across *all* agents that this one user has scheduled out there. Part of the challenge there is this particular user may have originally scheduled these particular re-ocurring procedures 6 or 7 years ago...
Jonathan - I know what you're asking and we've had that query as well. Let me check and get back....
I found this query that was something Josh Davey gave us:
m.machName as Computernaam,
CASE WHEN s.scriptName LIKE '%Patch%' OR s.scriptName LIKE 'Opt-in for Microsoft Update%' then 'Patch management' else CASE WHEN s.ScriptName LIKE 'KES%' THEN 'KES / AVG' ELSE CASE WHEN s.scriptName LIKE '%Audit%' OR s.scriptName LIKE '%Add/Remove%' THEN 'Audit' ELSE s.scriptName END END END AS ScriptType
FROM [ksubscribers].[dbo].[scriptlog] as s
left join [ksubscribers].[dbo].[machNameTab] as m on m.agentGuid = s.agentGuid
left join [ksubscribers].[dbo].[scriptAssignment] as sa on sa.Id = s.scriptId
--Welke Kaseya Admin betreft het?
WHERE s.actionAdmin = 'YourAdminName'
ORDER BY m.groupName, m.machName
In the second to last line you obviously have to replace 'YourAdminName' with the one you're looking for. It's not exactly complete, but it's a start. You could leave out the CASE WHEN statement that narrows down the search. Have fun!
Have you considered using the info center? You can run an agent procedures report on "next exec time" and filter by admin.
yeah, unfortunately that reporting in InfoCenter apparently has some issues. I had already tried exactly what you are suggesting there, and unfortunately it shows a bunch of incorrect data for some reason. I get about 3 pages of scripts that are *supposedly* scheduled by this admin, but they are all ones where the script scheduled date is in the past, but the machine hasn't been online since then, plus if I go look at the exact machines in question on the pending procedures, the *latest* run of that procedure wasn't even scheduled by this guy, but someone else entirely.
OudjesEric - That may get me at least close. As it it doesn't "quite" work, as it's not showing me 100% accurate data either, but it may give me enough to get started with.