# Add-OfficeNotebookOutput

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

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`OfficeIMO.Notebook.NotebookCell`

**Outputs**

`OfficeIMO.Notebook.NotebookCell`

**Source**

[AddOfficeNotebookOutputCommand.cs:12](https://github.com/EvotecIT/OfficeIMO/blob/51cd59ece1fa22f062b7419cfd3afa43c266a7cf/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Notebook/AddOfficeNotebookOutputCommand.cs#L12) 

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

## Syntax

```
Add-OfficeNotebookOutput
-Cell <NotebookCell>
[-PassThru]
[-Stream <stdout|stderr>]
-Text <String>
[<CommonParameters>]
```

[#](#method-add-officenotebookoutput-notebookcell-switchparameter-string-string)

Parameter set: `Stream`

```
Add-OfficeNotebookOutput
-Cell <NotebookCell>
-Output <NotebookOutput>
[-PassThru]
[<CommonParameters>]
```

[#](#method-add-officenotebookoutput-notebookcell-notebookoutput-switchparameter)

Parameter set: `Saved`

## Examples

### Record console text captured by the caller.

```powershell
$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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

<!-- PowerForge markdown artifact sha256:C37956D33654CEC6DA06B924514AE6A8E5F3F727BF898D3A134BC76BFAFBC41B -->
