Previous Topic: RemoteTarget.onError MethodNext Topic: RemoteTarget.receivedOutput Method


RemoteTarget.output Method

Scripts produce two types of result information. The output that is typically written to the screen and a final return value. This method returns a string with the output generated by the script running on the remote system. The output is accumulated while the script is running, so this method can return a non-empty result before script execution completes.

This method has the following syntax:

output()

The method returns a string with the date written to stdout by the script.

Example

Remotely query list of running services on a Windows host:

rt = new RemoteTarget("ascli1", "bob", "casogood42");
run-remote "! sc query" on rt -wait
? rt.output()

See also:

RemoteTarget.result Method