SCCMWebService..::..RunPowerShellScriptWithResultString Method (String, String, array<String>[]()[][], ScriptTypes)
Runs the powershell script file on the target computer.
Namespace:
SCCMWebServiceAssembly: SCCMWebService (in SCCMWebService.dll)
Syntax
[SoapHeaderAttribute] [WebMethodAttribute] public string RunPowerShellScriptWithResultString( string computerName, string scriptFileName, string[] arguments, ScriptTypes scriptType )
<SoapHeaderAttribute> _ <WebMethodAttribute> _ Public Function RunPowerShellScriptWithResultString ( _ computerName As String, _ scriptFileName As String, _ arguments As String(), _ scriptType As ScriptTypes _ ) As String
[SoapHeaderAttribute] [WebMethodAttribute] public: String^ RunPowerShellScriptWithResultString( String^ computerName, String^ scriptFileName, array<String^>^ arguments, ScriptTypes^ scriptType )
Parameters
- computerName
- Type: String
Name of the computer.
- scriptFileName
- Type: String
Name of the script file.
- arguments
- Type: array<String>[]()[][]
The parameters.
- scriptType
- Type: SCCMWebService.DataObjects..::..ScriptTypes
Type of the script.
Return Value
DataSet.Exceptions
Exception | Condition |
---|---|
Exception | Computer name must not be empty! or Unable to get DNS host name for computer + computerName + ! |