Scripting Integrator - Online Help
Scripting Integrator
Questions / Feedback?

EvalFile Method

Execute a script file on the PowerShell runspace.

Syntax

[VB.NET]
Public Function EvalFile(ByVal Path As String) As String
[C#]
public string EvalFile(string path);

Remarks

The Path parameter contains the fully qualified path of the script file to execute.

Eval Notes

When calling Eval or EvalFile any custom functions must first be defined by calling AddFunction. When the function is encountered the Function event will fire. Within this event query the Parameters collection to get the function parameter values. The return value of the custom function is defined within the Function event.

Any errors such as undefined functions or other issue will cause the Error event. Errors will not cause an exception. It is important to monitor the Error event for information about any errors that occur.

The return value from Eval or EvalFile is the output from successful execution of the JavaScript.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 1.0.6240.0