Skip to content

Get-ConfluenceAttachment throws error for archived pages #206

@andreibirzu

Description

@andreibirzu

Hello,

It looks like Get-ConfluenceAttachment stops running if it hits an archived page

Get-ConfluenceAttachment -PageID 4033119267
ConvertTo-Attachment : Cannot convert value "4033119267?status=archived" to type "System.UInt32". Error: "Input string was not in a correct format."
At C:\Program Files\WindowsPowerShell\Modules\ConfluencePS\2.5.1\ConfluencePS.psm1:1083 char:43
                                 $result | & $converter
                                           ~~~~~~~~~~~~
     CategoryInfo          : MetadataError: (:) [ConvertTo-Attachment], ArgumentTransformationMetadataException
     FullyQualifiedErrorId : RuntimeException,ConvertTo-Attachment

Works normal for status=current.

Get-ConfluencePage -SpaceKey xxx

ID         Status    Title                                SpaceKey        Version
--         ------    -----                                --------        -------
4031965581 current   ...                                    xxx           7      
4033021639 current   ...                                    xxx           7      
4033119267 archived  ...                                    xxx           7      
4082338730 current   ...                                    xxx           2      
4082894772 current   ...                                    xxx           2      
4082927575 current   ...                                    xxx           7      

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions