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

Add-OfficePowerPointSection

Aliases: PptSection
Namespace PSWriteOffice
Aliases
PptSection
Inputs
OfficeIMO.PowerPoint.PowerPointPresentation
Outputs
OfficeIMO.PowerPoint.PowerPointSectionInfo

Adds a section to a PowerPoint presentation.

Remarks

Creates a new section starting at the requested slide index or at the current slide inside the DSL.

Examples

Authored help example

Create a section that starts at slide 3.

PS>


New-OfficePowerPoint -Path .\Examples\Documents\PowerPointSections.pptx {
                Add-OfficePowerPointSlide -Layout 1 -PassThru | Set-OfficePowerPointSlideTitle -Title 'Overview'
                Add-OfficePowerPointSlide -Layout 1 -PassThru | Set-OfficePowerPointSlideTitle -Title 'Results'
                Add-OfficePowerPointSection -Name 'Results' -StartSlideIndex 1
            }
        

Creates a section named Results starting at the second slide.

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

Add-OfficePowerPointSection -Name <String> [-PassThru] [-Presentation <PowerPointPresentation>] [-StartSlideIndex <Int32>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Name String requiredposition: namedpipeline: False
Name of the section to add.
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).
StartSlideIndex Int32 optionalposition: namedpipeline: False
Zero-based slide index where the section should start.

Outputs

OfficeIMO.PowerPoint.PowerPointSectionInfo