SCCM WebService API Reference

SCCMWebService..::..RunPowerShellScript Method (String, array<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, 
	array<String^>^ arguments, 
	ScriptTypes^ scriptType
)

Parameters

scriptFileName
Type: String
Name of the script file.
arguments
Type: array<String>[]()[][]
The arguments.
scriptType
Type: SCCMWebService.DataObjects..::..ScriptTypes
Type of the script.

Return Value

true if successull, false otherwise.