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

Set-OfficeConfluenceManagedSection

Module
PSWriteOffice
Inputs
System.String
Outputs
OfficeIMO.Confluence.ConfluenceManagedSectionResult System.String

Safely replaces one marker-delimited section in a Confluence storage body.

Syntax

Set-OfficeConfluenceManagedSection
[-AppendIfMissing]
-ExistingBody <String>
[-PassThruBody]
-Replacement <String>
-SectionId <String>
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Examples

Replace a generated report while preserving owner-authored content.

$result = Set-OfficeConfluenceManagedSection -ExistingBody $storage -SectionId daily-report -Replacement $html -AppendIfMissing

Returns before/after hashes and the updated body without contacting Confluence.

Parameters

-AppendIfMissing SwitchParameter optional
Append a new marker pair when the section does not exist.
-ExistingBody String requiredpipeline: True (ByValue)
Existing Confluence storage body.
-PassThruBody SwitchParameter optional
Return only the updated body string.
-Replacement String required
Replacement storage-format content.
-SectionId String required
Stable marker identifier.

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.