SCCM WebService API Reference

SCCMWebService..::..ShutdownComputer Method

Shutdowns the specified computer.

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

Syntax


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

Parameters

computername
Type: String
The computer name.
timeoutSeconds
Type: Int32
The timeout in seconds.
force
Type: Boolean
if set to true force shutdown.

Return Value

true if succeeded, otherwise false.

Exceptions


ExceptionCondition
ExceptionComputer name must not be empty! or Unable to get DNS host name for computer + computername + ! or Unable to shutdown computer + computername + because host is unreachable!