SCCM WebService API Reference

SCCMWebService..::..KillTask Method

Kills the specified task.

Namespace:  SCCMWebService
Assembly:  SCCMWebService (in SCCMWebService.dll)

Syntax


[SoapHeaderAttribute]
[WebMethodAttribute]
public int KillTask(
	string computername,
	string handle,
	bool force,
	bool ignoreErrors
)
<SoapHeaderAttribute> _
<WebMethodAttribute> _
Public Function KillTask ( _
	computername As String, _
	handle As String, _
	force As Boolean, _
	ignoreErrors As Boolean _
) As Integer
[SoapHeaderAttribute]
[WebMethodAttribute]
public:
int^ KillTask(
	String^ computername, 
	String^ handle, 
	bool^ force, 
	bool^ ignoreErrors
)

Parameters

computername
Type: String
The computername.
handle
Type: String
The handle.
force
Type: Boolean
if set to true force task kill.
ignoreErrors
Type: Boolean
if set to true ignore errors.

Return Value

ErrorCode as Int32.

Exceptions


ExceptionCondition
ExceptionComputer name must not be empty! or Unable to get DNS host name for computer + computername + ! or Handle must not be empty! or Unable to kill task with Handle + handle + on computer + computername + because host is unreachable! or Unable to get task name for handle + handle + ! or Task + TaskName + must no be killed because it is excluded by task exclusion list (please see Application.config)!