Create a new page on your Confluence instance.
New-ConfluencePage -ApiUri <Uri> -Credential <PSCredential> -Title <String> [-ParentID <Int32>] [-Parent <Page>] [-SpaceKey <String>] [-Space <Space>] [-Body <String>] [-Convert] [-WhatIf] [-Confirm]
New-ConfluencePage -ApiUri <Uri> -Credential <PSCredential> -InputObject <Page> [-WhatIf] [-Confirm]
Create a new page on Confluence.
Optionally include content in -Body. Body content needs to be in “Confluence storage format” – see also -Convert.
New-ConfluencePage -Title 'Test New Page' -SpaceKey Hoth
Create a new blank wiki page at the root of space “Hoth”.
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.
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.
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.
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.
$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.
The URi of the API interface. Value can be set persistently with Set-ConfluenceInfo.
Type: Uri
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Confluence’s credentials for authentication. Value can be set persistently with Set-ConfluenceInfo.
Type: PSCredential
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Certificate for authentication.
Type: X509Certificate
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
A ConfluencePS.Page object from which to create a new page.
Type: Page
Parameter Sets: byObject
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Name of your new page.
Type: String
Parameter Sets: byParameters
Aliases: Name
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
The ID of the parent page.
NOTE: This feature is not in the 5.8 REST API documentation, and should be considered experimental.
Type: Int32
Parameter Sets: byParameters
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
Supply a ConfluencePS.Page object to use as the parent page.
Type: Page
Parameter Sets: byParameters
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Key of the space where the new page should exist.
Only needed if you don’t specify a parent page.
Type: String
Parameter Sets: byParameters
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Space Object in which to create the new page.
Only needed if you don’t specify a parent page.
Type: Space
Parameter Sets: byParameters
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The contents of your new page.
Type: String
Parameter Sets: byParameters
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Optionally, convert the provided body to Confluence’s storage format. Has the same effect as calling ConvertTo-ConfluenceStorageFormat against your Body.
Type: SwitchParameter
Parameter Sets: byParameters
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False