Capture Task Server assignment on the agent
search cancel

Capture Task Server assignment on the agent

book

Article ID: 385479

calendar_today

Updated On:

Products

IT Management Suite Client Management Suite

Issue/Introduction

Is there a script that can be run to capture the Task Server assignment on the SMP agent?

Environment

ITMS 8.x

CMS 8.x

Resolution

Here is a snippet of VB code that may be used to return Task Server registration agent side.

    set tn = CreateObject("ClientTaskAgent.TaskServerNetCommsCon")
    reg = tn.IsRegistered
    wscript.echo "Agent is registered on TS: " & reg
    sv = tn.ServerName
    wscript.echo "Server: " & sv
    tp = tn.TicklePort
   wscript.echo "Tickle port: " & tp

To use this script, create a new Run Script task and set the Script Type to VBScript. 

On the Advanced Tab, select "Save script output with task status" and Run this task on systems in the environment.  View output as needed.

NOTE: this isn't a great way to see IF an agent has registered with a Task Server, as this task would not run if there is no Task Server assigned as the agent would not get the task.