A while ago I have written an article about how to create custom tasks. One question that came up was: “How can I bring information from an incident to the task (as a task parameter)”? This article shows how.
I will use the same goal as in this article. The goal is to add a tasks that will launch the SCCM Remote Control Client directly from the Service Manager Console. This time however, we want to directly add the affected computer that is listed in a specific incident. This saves you some clicks, manual inputs and therefore time.
Let’s start by creating a new task in the library. I will give it a meaningful name and choose “Incident” as target. The goal is to have this task ready whenever an Incident is selected.
I don’t wanna see the Task somewhere else, therefore I leave the category selection blank.
Now I choose the correct path to the executable (rc.exe) and define the parameters. The first parameter is “1” which means, that we will access the computer by using a computer name, not a Resource ID. The second parameter is the computer name itself. Because I want to use the computer name that is already added to the incident, I select the correct attribute from the browsing window.
Is related to configuration Item
That’s it. After saving the new task I does exactly what I want. I choose an Incident that has an affected Item (Windows Computer). Now when I start the task it will automatically add the computer name as a task parameter and connect to it.
If an Incident does not contain a computer object, you must manually enter the name in a windows that pops up. If an incident contains more than one computer object, you must manually choose one of them.
Now feel free to try out your own dynamic tasks!