On this page

Set-Label

SYNOPSIS

Set the labels applied to existing Confluence content.

SYNTAX

Set-Label -apiURi <Uri> -Credential <PSCredential> [-PageID] <Int32[]> -Label <String[]> [-WhatIf] [-Confirm]

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.

EXAMPLES

————————– 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.

PARAMETERS

-apiURi

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

Type: Uri
Parameter Sets: (All)
Aliases:

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

-Credential

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

Type: PSCredential
Parameter Sets: (All)
Aliases:

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

-PageID

The page ID to remove the label from. Accepts multiple IDs via pipeline input.

Type: Int32[]
Parameter Sets: (All)
Aliases: ID

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Label

Label names to add to the content.

Type: String[]
Parameter Sets: (All)
Aliases:

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

-WhatIf

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

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

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

INPUTS

OUTPUTS

ConfluencePS.ContentLabelSet

NOTES

https://github.com/AtlassianPS/ConfluencePS