SCCM WebService API Reference

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

Runs the given powershell script on local system using power shell path for the specified script type (e.g. ScriptType.Local: ..\Custom\Local).

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

Syntax


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

Parameters

scriptFileName
Type: String
Name of the script file.
arguments
Type: String
The arguments.
scriptType
Type: SCCMWebService.DataObjects..::..ScriptTypes
Type of the script.

Return Value

true if successfull, false otherwise.