Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
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: ExistingBody

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.