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

Get-OfficePowerPointSection

Module
PSWriteOffice
Inputs
OfficeIMO.PowerPoint.PowerPointPresentation
Outputs
OfficeIMO.PowerPoint.PowerPointSectionInfo

Gets PowerPoint sections from a presentation.

Syntax

Get-OfficePowerPointSection
[-CaseSensitive]
[-Name <String>]
[-Presentation <PowerPointPresentation>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Returns OfficeIMO section metadata so scripts can inspect section names and slide ranges.

Examples

List all sections in a deck.

$ppt = New-OfficePowerPoint -Path .\Examples\Documents\PowerPointSectionsRead.pptx -NoSave
Add-OfficePowerPointSlide -Presentation $ppt -Layout 1
Add-OfficePowerPointSection -Presentation $ppt -Name 'Appendix' -StartSlideIndex 0
Get-OfficePowerPointSection -Presentation $ppt | Select-Object Name, FirstSlideIndex, SlideCount
$ppt | Close-OfficePowerPoint

Returns section information including section names and slide indexes.

Parameters

-CaseSensitive SwitchParameter optional
Use case-sensitive matching for section names.
-Name String optional
Optional section name filter.
-Presentation PowerPointPresentation optionalpipeline: True (ByValue)
Presentation to inspect (optional inside DSL).

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.