# Remove-OfficePowerPointSlide

Removes a slide by index. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice API Reference.

Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **727**

Forks **84**

Open issues **7**

Total downloads **5,275,783**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-24

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`None`

**Source**

[RemoveOfficePowerPointSlideCommand.cs:20](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/PowerPoint/RemoveOfficePowerPointSlideCommand.cs#L20) 

Removes a slide by index.

## Syntax

```
Remove-OfficePowerPointSlide
-Index <Int32>
[-PassThru]
-Presentation <PowerPointPresentation>
[<CommonParameters>]
```

[#](#method-remove-officepowerpointslide-int32-switchparameter-powerpointpresentation)

Parameter set: `All Parameter Sets`

## Description

Supports -WhatIf/-Confirm thanks to SupportsShouldProcess.

## Examples

### Delete the first slide.

```powershell
$ppt = New-OfficePowerPoint -Path .\Examples\Documents\PowerPointRemoveSlide.pptx -NoSave
Add-OfficePowerPointSlide -Presentation $ppt -Layout 1
Add-OfficePowerPointSlide -Presentation $ppt -Layout 1
Remove-OfficePowerPointSlide -Presentation $ppt -Index 0 -Confirm:$false
Close-OfficePowerPoint -Presentation $ppt -Save
```

Removes the first slide and saves the updated deck.

## Parameters

**-Index Int32 required**

Zero-based slide index.

**-PassThru SwitchParameter optional**

Emit the object created or changed by the command.

**-Presentation PowerPointPresentation required**

Presentation to modify.

## 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).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:132C944C313E942FB7927C9EC28CDC18A951715F0F6336E3B9A9CC6AB943D5ED -->
