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

Rename-OfficePowerPointSection

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

Renames a PowerPoint section.

Syntax

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

Examples

Rename a section in a presentation.

$ppt = New-OfficePowerPoint -Path .\Examples\Documents\PowerPointRenameSection.pptx -NoSave
Add-OfficePowerPointSlide -Presentation $ppt -Layout 1
Add-OfficePowerPointSection -Presentation $ppt -Name 'Results' -StartSlideIndex 0
Rename-OfficePowerPointSection -Presentation $ppt -Name 'Results' -NewName 'Deep Dive' -PassThru
$ppt | Close-OfficePowerPoint -Save

Renames the first matching section and returns the updated section metadata.

Parameters

-CaseSensitive SwitchParameter optional
Use case-sensitive matching for the existing section name.
-Name String required
Existing section name.
-NewName String required
New section name.
-PassThru SwitchParameter optional
Emit the renamed section instead of no output.
-Presentation PowerPointPresentation optionalpipeline: True (ByValue)
Presentation to update (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.