Remove an Attachment.
Remove-ConfluenceAttachment -ApiUri <Uri> -Credential <PSCredential> [-Attachment] <Attachment[]> [-WhatIf] [-Confirm]
Remove Attachments from Confluence content.
Does accept multiple pages piped via Get-ConfluencePage.
Untested against non-page content.
$attachments = Get-ConfluenceAttachment -PageID 123456
Remove-ConfluenceAttachment -Attachment $attachments -Verbose -Confirm
Remove all attachment from page 12345 Verbose and Confirm flags both active; you will be prompted before deletion.
Get-ConfluenceAttachment -PageID 123456 | Remove-ConfluenceAttachment -WhatIf
Do trial deletion for all attachments on page with ID 123456, the WhatIf parameter prevents any modifications.
Get-ConfluenceAttachment -PageID 123456 | Remove-ConfluenceAttachment
Remove all Attachments on page 123456.
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
Confluence’s credentials for authentication. Value can be set persistently with Set-ConfluenceInfo.
Type: PSCredential
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Certificate for authentication.
Type: X509Certificate
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The Attachment(s) to remove.
Type: Attachment[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
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
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