< Back

Set-ConfluencePage

Mon Jan 13, 2020 4:46 am

NAME Set-ConfluencePage



SYNOPSIS

Edit an existing Confluence page.





SYNTAX

Set-Page -ApiUri <Uri> [-Credential <PSCredential>] [-Certificate <X509Certificate>] -InputObject <Page> [-WhatIf]

[-Confirm] [<CommonParameters>]



Set-Page -ApiUri <Uri> [-Credential <PSCredential>] [-Certificate <X509Certificate>] -PageID <Int32> [-Title

<String>] [-Body <String>] [-Convert] [-ParentID <Int32>] [-Parent <Page>] [-WhatIf] [-Confirm]

[<CommonParameters>]





DESCRIPTION

For existing page(s): Edit page content, page title, and/or change parent page.



Content needs to be in "Confluence storage format". Use `-Convert` if not preconditioned.





PARAMETERS

-ApiUri <Uri>

The URi of the API interface. Value can be set persistently with Set-ConfluenceInfo.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Credential <PSCredential>

Confluence's credentials for authentication. Value can be set persistently with Set-ConfluenceInfo.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Certificate <X509Certificate>

Certificate for authentication.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InputObject <Page>

Page Object which will be used to replace the current content.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-PageID <Int32>

The ID of the page to edit.



Required? true

Position? named

Default value 0

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-Title <String>

Name of the page; existing or new value can be used. Existing will be automatically supplied via Get-Page if

not manually included.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Body <String>

The full contents of the updated body (existing contents will be overwritten). If not yet in "storage

format"--or you don't know what that is--also use -Convert.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Convert [<SwitchParameter>]

Optional switch flag for calling ConvertTo-ConfluenceStorageFormat against your Body.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-ParentID <Int32>

Optionally define a new parent page. If unspecified, no change.



Required? false

Position? named

Default value 0

Accept pipeline input? False

Accept wildcard characters? false



-Parent <Page>

Optionally define a new parent page. If unspecified, no change.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

ConfluencePS.Page







NOTES









-------------------------- EXAMPLE 1 --------------------------



Set-ConfluencePage -PageID 123456 -Title 'Counting'



For existing wiki page 123456, change its name to "Counting".

-------------------------- EXAMPLE 2 --------------------------



Set-ConfluencePage -PageID 123456 -Body 'Hello World!' -Convert



For existing wiki page 123456, update its page contents to "Hello World!" -Convert applies the "Confluence storage

format" to your given string.

-------------------------- EXAMPLE 3 --------------------------



Set-ConfluencePage -PageID 123456 -ParentID 654321

Set-ConfluencePage -PageID 123456 -Parent (Get-ConfluencePage -PageID 654321)



Two different methods to set a new parent page. Parent page 654321 will now have child page 123456.

-------------------------- EXAMPLE 4 --------------------------



$page = Get-ConfluencePage -PageID 123456

$page.Title = "New Title"



Set-ConfluencePage -InputObject $page

$page | Set-ConfluencePage



Two different methods to set a new parent page using a `ConfluencePS.Page` object.



RELATED LINKS

Online Version: https://atlassianps.org/docs/Confluence ... /Set-Page/

https://github.com/AtlassianPS/ConfluencePS https://github.com/AtlassianPS/ConfluencePS