# Add-OfficePowerPointSlide

Adds a new slide to a PowerPoint presentation. 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 **725**

Forks **84**

Open issues **3**

Total downloads **5,231,343**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-23

Cmdlet 

Aliases: PptSlide

**Module**

`PSWriteOffice`

**Aliases**

`PptSlide`

**Inputs**

`OfficeIMO.PowerPoint.PowerPointPresentation`

**Source**

[AddOfficePowerPointSlideCommand.cs:26](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/PowerPoint/AddOfficePowerPointSlideCommand.cs#L26) 

Adds a new slide to a PowerPoint presentation.

## Syntax

```
Add-OfficePowerPointSlide
[[-Content] <ScriptBlock>]
[-Layout <Int32>]
[-Master <Int32>]
[-PassThru]
[-Presentation <PowerPointPresentation>]
[<CommonParameters>]
```

[#](#method-add-officepowerpointslide-scriptblock-int32-int32-switchparameter-powerpointpresentation)

Parameter set: `Index`

```
Add-OfficePowerPointSlide
[-CaseSensitive]
[[-Content] <ScriptBlock>]
-LayoutName <String>
[-Master <Int32>]
[-PassThru]
[-Presentation <PowerPointPresentation>]
[<CommonParameters>]
```

[#](#method-add-officepowerpointslide-switchparameter-scriptblock-string-int32-switchparameter-powerpointpresentation)

Parameter set: `Name`

```
Add-OfficePowerPointSlide
[[-Content] <ScriptBlock>]
-LayoutType <PowerPointSlideLayoutType>
[-Master <Int32>]
[-PassThru]
[-Presentation <PowerPointPresentation>]
[<CommonParameters>]
```

[#](#method-add-officepowerpointslide-scriptblock-powerpointslidelayouttype-int32-switchparameter-powerpointpresentation)

Parameter set: `Type`

## Description

Creates a slide using OfficeIMO master/layout indexes and can execute nested DSL content.

## Examples

### Append a slide with the default layout.

```powershell
$ppt = New-OfficePowerPoint -Path .\deck.pptx -NoSave
Add-OfficePowerPointSlide -Presentation $ppt
$ppt | Close-OfficePowerPoint -Save
```

Creates a deck and appends a new slide at the end.

### Create a slide using the DSL.

```powershell
New-OfficePowerPoint -Path .\deck.pptx { PptSlide { PptTitle -Title 'Status Update' } }
```

Creates a slide and sets the title using DSL aliases.

## Parameters

**-Content ScriptBlock optionalposition: 0**

Nested DSL content executed within the slide scope.

**-Layout Int32 optionalsets: Index**

Layout index to use (matches the template’s built-in layouts).

**-Master Int32 optional**

Slide master index to use.

**-PassThru SwitchParameter optional**

Emit the object created or changed by the command.

**-Presentation PowerPointPresentation optionalpipeline: True (ByValue)**

Presentation to update (optional inside New-OfficePowerPoint).

**-CaseSensitive SwitchParameter optionalsets: Name**

Use case-sensitive matching for layout names.

**-LayoutName String requiredsets: Name**

Layout name to use (case-insensitive by default).

**-LayoutType PowerPointSlideLayoutType requiredsets: Type**

Layout type to use.

Possible values: `Title`, `Text`, `TwoColumnText`, `Table`, `TextAndChart`, `ChartAndText`, `Diagram`, `Chart`, `TextAndClipArt`, `ClipArtAndText`, `TitleOnly`, `Blank`, `TextAndObject`, `ObjectAndText`, `ObjectOnly`, `Object`, `TextAndMedia`, `MediaAndText`, `ObjectOverText`, `TextOverObject`, `TextAndTwoObjects`, `TwoObjectsAndText`, `TwoObjectsOverText`, `FourObjects`, `VerticalText`, `ClipArtAndVerticalText`, `VerticalTitleAndText`, `VerticalTitleAndTextOverChart`, `TwoObjects`, `ObjectAndTwoObjects`, `TwoObjectsAndObject`, `Custom`, `SectionHeader`, `TwoTextAndTwoObjects`, `ObjectText`, `PictureText`

## 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:A151AF015C3D1476882C18CDBA18856C80C461CA6EFBA58F4988BF7179D98DF9 -->
