# Remove-OfficeNotebookCell

Removes a cell from a live notebook. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice Cmdlet Reference.

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`OfficeIMO.Notebook.NotebookDocument`

**Outputs**

`OfficeIMO.Notebook.NotebookDocument`

**Source**

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

Removes a cell from a live notebook.

## Syntax

```
Remove-OfficeNotebookCell
-Document <NotebookDocument>
[-Index] <Int32>
[-PassThru]
[<CommonParameters>]
```

[#](#method-remove-officenotebookcell-notebookdocument-int32-switchparameter)

Parameter set: `All Parameter Sets`

## Examples

### Preview removal of the first cell.

```powershell
$notebook | Remove-OfficeNotebookCell -Index 0 -WhatIf
```

## Parameters

**-Document NotebookDocument requiredpipeline: True (ByValue)**

Live notebook containing the cell.

**-Index Int32 requiredposition: 0**

Zero-based position of the cell to remove.

**-PassThru SwitchParameter optional**

Return the updated document.

## 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:8C9E9CEE3BF1ED2A96211B2F826EB86B1EBA9758A36624575C9CBA2DF9ABAAC9 -->
