< Back

Add-ConfluenceLabel

Mon Jan 13, 2020 4:26 am

NAME Add-ConfluenceLabel



SYNOPSIS

Add a new global label to an existing Confluence page.





SYNTAX

Add-Label [[-PageID] <Int32[]>] -ApiUri <Uri> [-Credential <PSCredential>] [-Certificate <X509Certificate>] -Label

<Object> [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

Assign labels (one or more) to Confluence pages (one or more).



If the label did not exist previously, it will be created. Preexisting labels are not affected.





PARAMETERS

-ApiUri <Uri>

The URi of the API interface. Value can be set persistently with Set-Info.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Credential <PSCredential>

Confluence's credentials for authentication. Value can be set persistently with Set-ConfluenceInfo.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Certificate <X509Certificate>

Certificate for authentication.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-PageID <Int32[]>

The ID of the page to which apply the label to. Accepts multiple IDs, including via pipeline input.



Required? false

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



-Label <Object>

One or more labels to be added. Currently only supports labels of prefix "global".



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



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

ConfluencePS.ContentLabelSet







NOTES









-------------------------- EXAMPLE 1 --------------------------



Add-ConfluenceLabel -PageID 123456 -Label alpha -Verbose



Apply the label alpha to the wiki page with ID 123456. -Verbose output provides extra technical details, if

interested.

-------------------------- EXAMPLE 2 --------------------------



Get-ConfluencePage -SpaceKey SRV | Add-ConfluenceLabel -Label servers -WhatIf



Simulates applying the label "servers" to all pages in the space with key SRV. -WhatIf provides PageIDs of pages

that would have been affected.

-------------------------- EXAMPLE 3 --------------------------



Get-ConfluencePage -SpaceKey DEMO | Add-ConfluenceLabel -Label abc -Confirm



Applies the label "abc" to all pages in the space with key DEMO. -Confirm prompts Yes/No for each page that would

be affected.



RELATED LINKS

Online Version: https://atlassianps.org/docs/Confluence ... Add-Label/

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