Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Add-OfficeNotebookOutput

Module
PSWriteOffice
Inputs
OfficeIMO.Notebook.NotebookCell
Outputs
OfficeIMO.Notebook.NotebookCell

Attaches saved output or supplied console text to a code cell.

Syntax

Add-OfficeNotebookOutput
-Cell <NotebookCell>
[-PassThru]
[-Stream <stdout|stderr>]
-Text <String>
[<CommonParameters>]
#
Parameter set: Stream
Add-OfficeNotebookOutput
-Cell <NotebookCell>
-Output <NotebookOutput>
[-PassThru]
[<CommonParameters>]
#
Parameter set: Saved

Examples

Record console text captured by the caller.

$cell | Add-OfficeNotebookOutput -Stream stdout -Text 'Lab result'

Parameters

-Cell NotebookCell requiredpipeline: True (ByValue)
Code cell to extend.
-PassThru SwitchParameter optional
Return the updated cell.
-Stream String optionalsets: Stream
Console stream associated with the supplied text.
Possible values: stdout, stderr
-Text String requiredsets: Stream
Saved text for the stream output.
-Output NotebookOutput requiredsets: Saved
Existing saved output to copy to the cell.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.