SCCM WebService API Reference

SCCMWebService..::..RunPowerShellScript Method (String, String, String)

Runs a powershell script on the given computer. (OBSOLETE)

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

Syntax


[SoapHeaderAttribute]
[ObsoleteAttribute]
[WebMethodAttribute]
public bool RunPowerShellScript(
	string computerName,
	string scriptFileName,
	string arguments
)
<SoapHeaderAttribute> _
<ObsoleteAttribute> _
<WebMethodAttribute> _
Public Function RunPowerShellScript ( _
	computerName As String, _
	scriptFileName As String, _
	arguments As String _
) As Boolean
[SoapHeaderAttribute]
[ObsoleteAttribute]
[WebMethodAttribute]
public:
bool^ RunPowerShellScript(
	String^ computerName, 
	String^ scriptFileName, 
	String^ arguments
)

Parameters

computerName
Type: String
Name of the computer.
scriptFileName
Type: String
Name of the script file.
arguments
Type: String
The arguments.

Return Value

true if successfull, false otherwise.

Exceptions


ExceptionCondition
Exception Computer name must not be empty! or Script file name must not be empty! or Unable to get DNS host name for computer + computerName + !