< Back

Set-ConfluenceLabel

Mon Jan 13, 2020 4:45 am

NAME Set-ConfluenceLabel



SYNOPSIS

Set the labels applied to existing Confluence content.





SYNTAX

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

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





DESCRIPTION

Sets desired labels for Confluence content.



All preexisting labels will be removed in the process.



> Note: Currently, Set-ConfluenceLabel only supports interacting with wiki pages.





PARAMETERS

-ApiUri <Uri>

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



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 page ID to remove the label from. Accepts multiple IDs via pipeline input.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



-Label <String[]>

Label names to add to the content.



Required? true

Position? named

Default value None

Accept pipeline input? False

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



Set-ConfluenceLabel -PageID 123456 -Label 'a','b','c'



For existing wiki page with ID 123456, remove all labels, then add the three specified.

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



Get-ConfluencePage -SpaceKey 'ABC' | Set-Label -Label '123' -WhatIf



Would remove all labels and apply only the label "123" to all pages in the ABC space. -WhatIf reports on simulated

changes, but does not modifying anything.



RELATED LINKS

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

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