Specify wiki location and authorization for use in this session’s REST API requests.
Set-ConfluenceInfo [[-BaseURi] <Uri>] [[-Credential] <PSCredential>] [[-PageSize] <Int32>] [-PromptCredentials]
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.
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.
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.
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).
$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).
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
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
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
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
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.)