Add a new attachment to an existing Confluence page.
Add-ConfluenceAttachment -ApiUri <Uri> -Credential <PSCredential> [[-PageID] <Int32>] -FilePath <String> [-WhatIf] [-Confirm]
Add Attachments (one or more) to Confluence pages (one or more). If the Attachment did not exist previously, it will be created.
This will not update an already existing Attachment; see Set-Attachment for updating a file.
Add-ConfluenceAttachment -PageID 123456 -FilePath test.png -Verbose
Adds the Attachment test.png to the wiki page with ID 123456. -Verbose output provides extra technical details, if interested.
Get-ConfluencePage -SpaceKey SRV | Add-ConfluenceAttachment -FilePath test.png -WhatIf
Simulates adding the Attachment test.png to all pages in the space with key SRV. -WhatIf provides PageIDs of pages that would have been affected.
The URi of the API interface. Value can be set persistently with Set-Info.
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 ID of the page to which apply the Attachment to. Accepts multiple IDs, including 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
One or more files to be added.
Type: String[]
Parameter Sets: (All)
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, 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