SCCM WebService API Reference

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

Runs the given powershell script. (OBSOLETE)

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

Syntax


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

Parameters

computerName
Type: String
Name of the computer.
scriptFileName
Type: String
Name of the script file.
arguments
Type: array<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 + !