Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-ConfluenceAttachment throws error for archived pages #206

Open
andreibirzu opened this issue Nov 3, 2022 · 0 comments
Open

Get-ConfluenceAttachment throws error for archived pages #206

andreibirzu opened this issue Nov 3, 2022 · 0 comments

Comments

@andreibirzu
Copy link

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      
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant