< Back

Set-ConfluenceInfo

Mon Jan 13, 2020 4:45 am

NAME Set-ConfluenceInfo



SYNOPSIS

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





SYNTAX

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

[<CommonParameters>]





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.





PARAMETERS

-BaseURi <Uri>

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



Required? false

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Credential <PSCredential>

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



Required? false

Position? 2

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-PageSize <Int32>

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



Required? false

Position? 3

Default value 0

Accept pipeline input? False

Accept wildcard characters? false



-PromptCredentials [<SwitchParameter>]

Prompt the user for credentials



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



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.)



-------------------------- 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).



RELATED LINKS

Online Version: https://atlassianps.org/docs/Confluence ... /Set-Info/

https://github.com/AtlassianPS/ConfluencePS https://github.com/AtlassianPS/ConfluencePS

ConfluencePS PR#59: Add proper Paging to Get functions https://github.com/AtlassianPS/ConfluencePS/pull/59