Get-ConfluenceAttachment doesnt work anymore cause PageID is bigger than Int32
ronnooy opened this issue · 1 comments
ronnooy commented
Get-ConfluenceAttachment -ApiUri -Credential [-PageID] <Int32[]> [-FileNameFilter ] [-MediaTypeFilter ] [-Skip ] [-First ] [-PageSize ] [-IncludeTotalCount]
ConvertTo-Attachment : Cannot convert value "5206343689" to type "System.UInt32". Error: "Value is too big or too small for a UInt32."
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
dustinbutterworth commented
As a temporary fix, I just replaced all instances of "UInt32" with "UInt64" in ConfluencePS.psm1 and ConfluencePS.Types.cs. Reloaded the module and I was able to get the attachment.
I'm fairly new to Powershell so I am not sure if this is an ideal solution, but it seems to be working for me.