Client Management Suite

 View Only

Task Instance x didn't return "@ReturnValue"

  • 1.  Task Instance x didn't return "@ReturnValue"

    Posted Sep 21, 2011 02:06 PM

    During the course of setting up my cloned (and various other) tasks and policies on my SMP v7.1 server, I created my own targets - the defaults include my management servers, which I'm not using CMS to manage. 

    If your custom targets don't evaluate correctly, your logs fill up very quickly with the error noted in the subject line, where 'x' is the GUID of the task.

    Of course, when you open the object browser, you get a blank resource record.

    I have been using the following SQL to help me identify the offending task.  I can then disable the task, figure out what is wrong with the custom target, and then fix and re-enable.

    The first query will get you the parent guid for that task instance.  The second will get you the actual name of the task.  After you disable the task, it will take a little while for the warnings to clear from the log.

    This can also be used for figuring out which task instance goes with a task.

    --Get ParentItem for a task

    Use Altiris_central

    Declare @GUID as nvarchar(40)

    Set @GUID = 'GUID from log'

    Select * from TaskInstanceParents where TaskInstanceGuid = @GUID

    --Get item from parent task guid from above query

    Select [name] from Item where GUid = 'ParentTaskInstanceGuid'