On this page

Set-Info

SYNOPSIS

Specify wiki location and authorization for use in this session’s REST API requests.

SYNTAX

Set-ConfluenceInfo [[-BaseURi] <Uri>] [[-Credential] <PSCredential>] [[-PageSize] <Int32>] [-PromptCredentials]

DESCRIPTION

Set-ConfluenceInfo uses scoped variables and PSDefaultParameterValues to supply URI/auth info to all other functions in the module (e.g. Get-ConfluenceSpace). These session defaults can be overwritten on any single command, but using Set-ConfluenceInfo avoids repetitively specifying -ApiURi and -Credential parameters.

Confluence’s REST API supports passing basic authentication in headers. (If you have a better suggestion for how to handle auth, please reach out on GitHub!)

Unless allowing anonymous access to your instance, credentials are needed.

EXAMPLES

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

Set-ConfluenceInfo -BaseURI 'https://yournamehere.atlassian.net/wiki' -PromptCredentials

Declare the URI of your Confluence instance; be prompted for username and password. Note that Atlassian Cloud Confluence instances typically use the /wiki subdirectory.

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

Set-ConfluenceInfo -BaseURI 'https://wiki.yourcompany.com'

Declare the URI of your Confluence instance. You will not be prompted for credentials, and other commands would attempt to connect anonymously with read-only permissions.

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

Set-ConfluenceInfo -BaseURI 'https://wiki.contoso.com' -PromptCredentials -PageSize 50

Declare the URI of your Confluence instance; be prompted for username and password. Set the default “page size” for all your commands in this session to 50 (see Notes).

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

$Cred = Get-Credential
Set-ConfluenceInfo -BaseURI 'https://wiki.yourcompany.com' -Credential $Cred

Declare the URI of your Confluence instance and the credentials (username and password).

PARAMETERS

-BaseURi

Address of your base Confluence install. For Atlassian Cloud instances, include /wiki.

Type: Uri
Parameter Sets: (All)
Aliases:

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

-Credential

The username/password combo you use to log in to Confluence.

Type: PSCredential
Parameter Sets: (All)
Aliases:

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

-PageSize

Default PageSize for the invocations. More info in the Notes field of this help file.

Type: Int32
Parameter Sets: (All)
Aliases:

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

-PromptCredentials

Prompt the user for credentials

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

INPUTS

OUTPUTS

NOTES

The default page size for all commands is 25. Using the -PageSize parameter changes the default for all commands in your current session.

Tweaking PageSize can help improve pipeline performance when returning many objects. See related links for implementation discussion and details.

(If you don’t know exactly what this means, feel free to ignore it.)

https://github.com/AtlassianPS/ConfluencePS

ConfluencePS PR#59: Add proper Paging to Get functions