On this page

Get-Page

SYNOPSIS

Retrieve a listing of pages in your Confluence instance.

SYNTAX

byId (Default)

Get-ConfluencePage -ApiUri <Uri> -Credential <PSCredential> [-PageID] <Int32[]> [-PageSize <Int32>] [-IncludeTotalCount] [-Skip <UInt64>] [-First <UInt64>]

byLabel

Get-ConfluencePage -ApiUri <Uri> -Credential <PSCredential> [-SpaceKey <String>] [-Space <Space>] -Label <String[]> [-PageSize <Int32>] [-IncludeTotalCount] [-Skip <UInt64>] [-First <UInt64>]

bySpace

Get-ConfluencePage -ApiUri <Uri> -Credential <PSCredential> -SpaceKey <String> [-Title <String>] [-PageSize <Int32>] [-IncludeTotalCount] [-Skip <UInt64>] [-First <UInt64>]

byQuery

Get-ConfluencePage -ApiUri <Uri> -Credential <PSCredential> [-Query <String>] [-PageSize <Int32>] [-IncludeTotalCount] [-Skip <UInt64>] [-First <UInt64>]

bySpaceObject

Get-ConfluencePage -ApiUri <Uri> -Credential <PSCredential> -Space <Space> [-Title <String>] [-PageSize <Int32>] [-IncludeTotalCount] [-Skip <UInt64>] [-First <UInt64>]

DESCRIPTION

Return Confluence pages, filtered by ID, Name, or Space.

EXAMPLES

————————– EXAMPLE 1 ————————–

Get-ConfluencePage -SpaceKey HOTH
Get-ConfluenceSpace -SpaceKey HOTH | Get-ConfluencePage

Two different methods to return all wiki pages in space “HOTH”. Both examples should return identical results.

————————– EXAMPLE 2 ————————–

Get-ConfluencePage -PageID 123456 | Format-List *

Returns the wiki page with ID 123456. Format-List * displays all of the object’s properties, including the full page body.

————————– EXAMPLE 3 ————————–

Get-ConfluencePage -Title 'luke*' -SpaceKey HOTH

Return all pages in HOTH whose names start with “luke” (case-insensitive). Wildcards (*) can be inserted to support partial matching.

————————– EXAMPLE 4 ————————–

Get-ConfluencePage -Label 'skywalker'

Return all pages containing the label “skywalker” (case-insensitive). Label text must match exactly; no wildcards are applied.

————————– EXAMPLE 5 ————————–

Get-ConfluencePage -Query "mention = jSmith and creator != jSmith"

Return all pages matching the query.

PARAMETERS

-ApiUri

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

-Credential

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

Certificate to use for the authentication with the REST Api.

If no sessions is available, the request will be executed anonymously.

Type: X509Certificate
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PageID

Filter results by page ID.

Best option if you already know the ID.

Type: Int32[]
Parameter Sets: byId
Aliases: ID

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Title

Filter results by page name (case-insensitive).

This supports wildcards (*) to allow for partial matching.

Type: String
Parameter Sets: bySpace, bySpaceObject
Aliases: Name

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-SpaceKey

Filter results by space key (case-insensitive).

Type: String
Parameter Sets: bySpaceObject, byLabel
Aliases: Key

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: String
Parameter Sets: bySpace
Aliases: Key

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Space

Filter results by space object(s), typically from the pipeline.

Type: Space
Parameter Sets: bySpaceObject, byLabel
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Type: Space
Parameter Sets: bySpaceObject
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Label

Filter results to only pages with the specified label(s).

Type: String[]
Parameter Sets: byLabel
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Query

Use Confluences advanced search: CQL.

This cmdlet will always append a filter to only look for pages (type=page).

Type: String
Parameter Sets: byQuery
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PageSize

Maximum number of results to fetch per call.

This setting can be tuned to get better performance according to the load on the server.

Warning: too high of a PageSize can cause a timeout on the request.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 25
Accept pipeline input: False
Accept wildcard characters: False

-IncludeTotalCount

NOTE: Not yet implemented.

Causes an extra output of the total count at the beginning.

Note this is actually a uInt64, but with a custom string representation.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Skip

Controls how many things will be skipped before starting output.

Defaults to 0.

Type: UInt64
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-First

NOTE: Not yet implemented.

Indicates how many items to return.

Type: UInt64
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 18446744073709551615
Accept pipeline input: False
Accept wildcard characters: False

INPUTS

OUTPUTS

ConfluencePS.Page

NOTES

Piped output into other cmdlets is generally tested and supported.

https://github.com/AtlassianPS/ConfluencePS