< Back
New-ConfluencePage
Post
NAME New-ConfluencePage
SYNOPSIS
Create a new page on your Confluence instance.
SYNTAX
New-Page -ApiUri <Uri> [-Credential <PSCredential>] [-Certificate <X509Certificate>] -InputObject <Page> [-WhatIf]
[-Confirm] [<CommonParameters>]
New-Page -ApiUri <Uri> [-Credential <PSCredential>] [-Certificate <X509Certificate>] -Title <String> [-ParentID
<Int32>] [-Parent <Page>] [-SpaceKey <String>] [-Space <Space>] [-Body <String>] [-Convert] [-WhatIf] [-Confirm]
[<CommonParameters>]
DESCRIPTION
Create a new page on Confluence.
Optionally include content in -Body. Body content needs to be in "Confluence storage format" -- see also -Convert.
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>
A ConfluencePS.Page object from which to create a new page.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-Title <String>
Name of your new page.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-ParentID <Int32>
The ID of the parent page.
> NOTE: This feature is not in the 5.8 REST API documentation, and should be considered experimental.
Required? false
Position? named
Default value 0
Accept pipeline input? False
Accept wildcard characters? false
-Parent <Page>
Supply a ConfluencePS.Page object to use as the parent page.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SpaceKey <String>
Key of the space where the new page should exist.
Only needed if you don't specify a parent page.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Space <Space>
Space Object in which to create the new page.
Only needed if you don't specify a parent page.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Body <String>
The contents of your new page.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Convert [<SwitchParameter>]
Optionally, convert the provided body to Confluence's storage format. Has the same effect as calling
ConvertTo-ConfluenceStorageFormat against your Body.
Required? false
Position? named
Default value False
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 --------------------------
New-ConfluencePage -Title 'Test New Page' -SpaceKey Hoth
Create a new blank wiki page at the root of space "Hoth".
-------------------------- EXAMPLE 2 --------------------------
New-ConfluencePage -Title 'Luke Skywalker' -Parent (Get-ConfluencePage -Title 'Darth Vader' -SpaceKey 'StarWars')
Creates a new blank wiki page as a child page below "Darth Vader" in the specified space.
-------------------------- EXAMPLE 3 --------------------------
New-ConfluencePage -Title 'Luke Skywalker' -ParentID 123456 -Verbose
Creates a new blank wiki page as a child page below the wiki page with ID 123456.
-Verbose provides extra technical details, if interested.
-------------------------- EXAMPLE 4 --------------------------
New-ConfluencePage -Title 'foo' -SpaceKey 'bar' -Body $PageContents
Create a new wiki page named 'foo' at the root of space 'bar'. The wiki page will contain the data stored in
$PageContents.
-------------------------- EXAMPLE 5 --------------------------
New-ConfluencePage -Title 'foo' -SpaceKey 'bar' -Body 'Testing 123' -Convert
Create a new wiki page named 'foo' at the root of space 'bar'.
The wiki page will contain the text "Testing 123". -Convert will condition the -Body parameter's string into
storage format.
-------------------------- EXAMPLE 6 --------------------------
$pageObject = [ConfluencePS.Page]@{
Title = "My Title"
Space = [ConfluencePS.Space]@{
Key="ABC"
}
}
# example 1
New-ConfluencePage -InputObject $pageObject
# example 2
$pageObject | New-ConfluencePage
Two different methods of creating a new page from an object `ConfluencePS.Page`.
Both examples should return identical results.
RELATED LINKS
Online Version: https://atlassianps.org/docs/Confluence ... /New-Page/
https://github.com/AtlassianPS/ConfluencePS https://github.com/AtlassianPS/ConfluencePS
SYNOPSIS
Create a new page on your Confluence instance.
SYNTAX
New-Page -ApiUri <Uri> [-Credential <PSCredential>] [-Certificate <X509Certificate>] -InputObject <Page> [-WhatIf]
[-Confirm] [<CommonParameters>]
New-Page -ApiUri <Uri> [-Credential <PSCredential>] [-Certificate <X509Certificate>] -Title <String> [-ParentID
<Int32>] [-Parent <Page>] [-SpaceKey <String>] [-Space <Space>] [-Body <String>] [-Convert] [-WhatIf] [-Confirm]
[<CommonParameters>]
DESCRIPTION
Create a new page on Confluence.
Optionally include content in -Body. Body content needs to be in "Confluence storage format" -- see also -Convert.
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>
A ConfluencePS.Page object from which to create a new page.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-Title <String>
Name of your new page.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-ParentID <Int32>
The ID of the parent page.
> NOTE: This feature is not in the 5.8 REST API documentation, and should be considered experimental.
Required? false
Position? named
Default value 0
Accept pipeline input? False
Accept wildcard characters? false
-Parent <Page>
Supply a ConfluencePS.Page object to use as the parent page.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SpaceKey <String>
Key of the space where the new page should exist.
Only needed if you don't specify a parent page.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Space <Space>
Space Object in which to create the new page.
Only needed if you don't specify a parent page.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Body <String>
The contents of your new page.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Convert [<SwitchParameter>]
Optionally, convert the provided body to Confluence's storage format. Has the same effect as calling
ConvertTo-ConfluenceStorageFormat against your Body.
Required? false
Position? named
Default value False
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 --------------------------
New-ConfluencePage -Title 'Test New Page' -SpaceKey Hoth
Create a new blank wiki page at the root of space "Hoth".
-------------------------- EXAMPLE 2 --------------------------
New-ConfluencePage -Title 'Luke Skywalker' -Parent (Get-ConfluencePage -Title 'Darth Vader' -SpaceKey 'StarWars')
Creates a new blank wiki page as a child page below "Darth Vader" in the specified space.
-------------------------- EXAMPLE 3 --------------------------
New-ConfluencePage -Title 'Luke Skywalker' -ParentID 123456 -Verbose
Creates a new blank wiki page as a child page below the wiki page with ID 123456.
-Verbose provides extra technical details, if interested.
-------------------------- EXAMPLE 4 --------------------------
New-ConfluencePage -Title 'foo' -SpaceKey 'bar' -Body $PageContents
Create a new wiki page named 'foo' at the root of space 'bar'. The wiki page will contain the data stored in
$PageContents.
-------------------------- EXAMPLE 5 --------------------------
New-ConfluencePage -Title 'foo' -SpaceKey 'bar' -Body 'Testing 123' -Convert
Create a new wiki page named 'foo' at the root of space 'bar'.
The wiki page will contain the text "Testing 123". -Convert will condition the -Body parameter's string into
storage format.
-------------------------- EXAMPLE 6 --------------------------
$pageObject = [ConfluencePS.Page]@{
Title = "My Title"
Space = [ConfluencePS.Space]@{
Key="ABC"
}
}
# example 1
New-ConfluencePage -InputObject $pageObject
# example 2
$pageObject | New-ConfluencePage
Two different methods of creating a new page from an object `ConfluencePS.Page`.
Both examples should return identical results.
RELATED LINKS
Online Version: https://atlassianps.org/docs/Confluence ... /New-Page/
https://github.com/AtlassianPS/ConfluencePS https://github.com/AtlassianPS/ConfluencePS