WSManReceiveShellOutput function

Retrieves output from a running command or from the shell.

Syntax


void WINAPI WSManReceiveShellOutput(
  _Inout_  HANDLE              shell,
  _In_opt_ HANDLE              command,
           DWORD               flags,
  _In_opt_ WSMAN_STREAM_ID_SET *desiredStreamSet,
  _In_     WSMAN_SHELL_ASYNC   *async,
  _Out_    HANDLE              *receiveOperation
);

Parameters

shell [in, out]

Specifies the shell handle returned by a WSManCreateShell call. This parameter cannot be NULL.

command [in, optional]

Specifies the command handle returned by a WSManRunShellCommand call.

flags

Reserved for future use. Must be set to zero.

desiredStreamSet [in, optional]

Specifies the requested output from a particular stream or a list of streams.

async [in]

Defines an asynchronous structure. The asynchronous structure contains an optional user context and a mandatory callback function. See the WSMAN_SHELL_ASYNC structure for more information. This parameter cannot be NULL and should be closed by calling the WSManCloseOperation method.

receiveOperation [out]

Defines the operation handle for the receive operation. This handle is returned from a successful call of the function and can be used to asynchronously cancel the receive operation. This handle should be closed by calling the WSManCloseOperation method. This parameter cannot be NULL.

Return value

This function does not return a value.

Requirements

Minimum supported client

Windows 7

Minimum supported server

Windows Server 2008 R2

Redistributable

Windows Management Framework on Windows Server 2008 with SP2, Windows Vista with SP1, and Windows Vista with SP2

Header

Wsman.h

Library

WsmSvc.lib

DLL

WsmSvc.dll

 

 

Show: