SCCM WebService API Reference

SCCMWebService..::..RunPowerShellScript Method (String, String, String, array<String>[]()[][], Boolean)

Runs the power shell script.

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

Syntax


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

Parameters

computerName
Type: String
Name of the computer.
psPath
Type: String
The ps path.
scriptFileName
Type: String
Name of the script file.
arguments
Type: array<String>[]()[][]
The arguments.
getResultString
Type: Boolean
if set to true [get result string].

Return Value

PowerShellResult.