# Clear-OfficeNotebookOutput

Clears saved results from a code cell, optionally including its execution count.

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`OfficeIMO.Notebook.NotebookCell`

**Outputs**

`OfficeIMO.Notebook.NotebookCell`

**Source**

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

Clears saved results from a code cell, optionally including its execution count.

## Syntax

```
Clear-OfficeNotebookOutput
-Cell <NotebookCell>
[-ExecutionCount]
[-PassThru]
[<CommonParameters>]
```

[#](#method-clear-officenotebookoutput-notebookcell-switchparameter-switchparameter)

Parameter set: `All Parameter Sets`

## Examples

### Clear all saved results before sharing a notebook.

```powershell
$notebook | Get-OfficeNotebookCell -Kind Code | Clear-OfficeNotebookOutput -ExecutionCount
```

## Parameters

**-Cell NotebookCell requiredpipeline: True (ByValue)**

Code cell containing the saved results.

**-ExecutionCount SwitchParameter optional**

Also clear the code cell's saved execution count.

**-PassThru SwitchParameter optional**

Return the updated 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:13D9DF8557D72B27584E20F4205508AEFD806D4C0E72EA283AC8F4BAF060AB1B -->
