# Move-OfficeNotebookCell

Moves a cell within a live notebook while keeping its identity and saved content.

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`OfficeIMO.Notebook.NotebookDocument`

**Outputs**

`OfficeIMO.Notebook.NotebookDocument`

**Source**

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

Moves a cell within a live notebook while keeping its identity and saved content.

## Syntax

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

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

Parameter set: `All Parameter Sets`

## Examples

### Move the third cell to the beginning.

```powershell
$notebook | Move-OfficeNotebookCell -Index 2 -DestinationIndex 0
```

## Parameters

**-DestinationIndex Int32 requiredposition: 1**

Zero-based final cell position.

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

Live notebook containing the cell.

**-Index Int32 requiredposition: 0**

Original zero-based cell position.

**-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:28DB5DDC047FB07B372F4F9C877BA7061F39F8F30BF6F630D083793D869B47C6 -->
