Previous Topic: OSRedirect.onError MethodNext Topic: OSRedirect.receivedErrOutput Method


OSRedirect.output Method

Child processes produce three types of result information. The regular output typically written to the screen, error output typically written to the screen, and a final exit code ("errorlevel"). This method returns a string with the output written by the child process to stdout.

This method has the following syntax:

output()

The method returns a string that contains the command output.

Example

Get Windows OS version string:

!! ver
? $$stdout.output()

See also:

OSRedirect.errout Method

OSRedirect.result Method

! Command--Invoke Command or Child Process (Cmdlet)

!! Command--Invoke Command or Child Process and Auto-capture Output (Cmdlet)