Project

PSWriteOffice

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

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
Cmdlet

Add-OfficePowerPointSection

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

Adds a section to a PowerPoint presentation.

Syntax

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

Description

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

Examples

Create a section that starts at slide 3.

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.

Parameters

-Name String required
Name of the section to add.
-PassThru SwitchParameter optional
Emit the object created or changed by the command.
-Presentation PowerPointPresentation optionalpipeline: True (ByValue)
Presentation to update (optional inside DSL).
-StartSlideIndex Int32 optional
Zero-based slide index where the section should start.

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.