Examples (The query needs the latest version of the UDF (1.2.1.0) which I'm going to release quite soon):
; Enable/Disable the Registered Task
Global $aProperties[] = ["TASK|Enabled|xxxx"] ; Replace xxxx with True or False to enable or disable the task
_TS_TaskPropertiesSet($oTask, $aProperties)
; Query the Registered Task
$aTaskProperties = _TS_TaskPropertiesGet($oService, $oTask, 1, False, "TASK", "Enabled")
MsgBox(0, "Query Task", "Task is enabled = " & $aTaskproperties[0][2])