Project

PSWriteOffice

PowerShell document automation across Word, Excel, PowerPoint, PDF, Reader, Confluence, Visio, and open text formats.

Stars 159
Forks 14
PowerShell Gallery downloads 158,661
Release v3.0.5
Language: C# Updated: 2026-09-03

API Reference

Cmdlet

Copy-OfficePowerPointSlide

Namespace PSWriteOffice
Inputs
OfficeIMO.PowerPoint.PowerPointPresentation
Outputs
OfficeIMO.PowerPoint.PowerPointSlide

Copies an existing slide within a PowerPoint presentation.

Remarks

Uses OfficeIMO slide duplication so charts, notes, and shapes are preserved.

Examples

Authored help example

Duplicate the first slide and insert the copy after it.

PS>


New-OfficePowerPoint -Path .\Examples\Documents\PowerPointCopySlide.pptx {
                $slide = Add-OfficePowerPointSlide -Layout 1 -PassThru
                Set-OfficePowerPointSlideTitle -Slide $slide -Title 'Original'
                $copy = Copy-OfficePowerPointSlide -Index 0 -PassThru
                Set-OfficePowerPointSlideTitle -Slide $copy -Title 'Copied appendix'
            }
        

Duplicates a slide and updates the copied slide title.

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.

Syntax

Copy-OfficePowerPointSlide -Index <Int32> [-InsertAt <Int32>] [-PassThru] [-Presentation <PowerPointPresentation>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Index Int32 requiredposition: namedpipeline: False
Zero-based slide index to duplicate.
InsertAt Int32 optionalposition: namedpipeline: False
Optional target index for the duplicate; omit to insert after the source slide.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the object created or changed by the command.
Presentation PowerPointPresentation optionalposition: namedpipeline: True (ByValue)
Presentation to update (optional inside DSL).

Outputs

OfficeIMO.PowerPoint.PowerPointSlide