< Back
Remove-ConfluenceAttachment
Post
NAME Remove-ConfluenceAttachment
SYNOPSIS
Remove an Attachment.
SYNTAX
Remove-Attachment [-Attachment] <Attachment[]> -ApiUri <Uri> [-Credential <PSCredential>] [-Certificate
<X509Certificate>] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
Remove Attachments from Confluence content.
Does accept multiple pages piped via Get-ConfluencePage.
> Untested against non-page content.
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
-Attachment <Attachment[]>
The Attachment(s) to remove.
Required? true
Position? 1
Default value None
Accept pipeline input? True (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
NOTES
-------------------------- EXAMPLE 1 --------------------------
$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.
-------------------------- EXAMPLE 2 --------------------------
Get-ConfluenceAttachment -PageID 123456 | Remove-ConfluenceAttachment -WhatIf
Do trial deletion for all attachments on page with ID 123456, the WhatIf parameter prevents any modifications.
-------------------------- EXAMPLE 3 --------------------------
Get-ConfluenceAttachment -PageID 123456 | Remove-ConfluenceAttachment
Remove all Attachments on page 123456.
RELATED LINKS
Online Version: https://atlassianps.org/docs/Confluence ... ttachment/
https://github.com/AtlassianPS/ConfluencePS https://github.com/AtlassianPS/ConfluencePS
SYNOPSIS
Remove an Attachment.
SYNTAX
Remove-Attachment [-Attachment] <Attachment[]> -ApiUri <Uri> [-Credential <PSCredential>] [-Certificate
<X509Certificate>] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
Remove Attachments from Confluence content.
Does accept multiple pages piped via Get-ConfluencePage.
> Untested against non-page content.
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
-Attachment <Attachment[]>
The Attachment(s) to remove.
Required? true
Position? 1
Default value None
Accept pipeline input? True (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
NOTES
-------------------------- EXAMPLE 1 --------------------------
$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.
-------------------------- EXAMPLE 2 --------------------------
Get-ConfluenceAttachment -PageID 123456 | Remove-ConfluenceAttachment -WhatIf
Do trial deletion for all attachments on page with ID 123456, the WhatIf parameter prevents any modifications.
-------------------------- EXAMPLE 3 --------------------------
Get-ConfluenceAttachment -PageID 123456 | Remove-ConfluenceAttachment
Remove all Attachments on page 123456.
RELATED LINKS
Online Version: https://atlassianps.org/docs/Confluence ... ttachment/
https://github.com/AtlassianPS/ConfluencePS https://github.com/AtlassianPS/ConfluencePS