Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Can't download the attachment from a Jira ticket with Powershell


I would like to download the attachment from a Jira ticket using the command

Get-JiraIssueAttachment -issue $Request | get-jiraissueattachmentfile -path $path"

but I got the error 


Invoke-JiraMethod : Server responsed with NotAcceptable
At C:\Program Files\WindowsPowerShell\Modules\JiraPS\2.14.6\JiraPS.psm1:1886 char:23
+ $result = Invoke-JiraMethod @iwParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidResult: (:) [Invoke-JiraMethod], RuntimeException
+ FullyQualifiedErrorId : InvalidResponse.Status406,Invoke-JiraMethod


I know it is error 406 that something to do with the proxy/firewall. So, I'd like to get around by using: 


Invoke-JiraMethod -Uri (Get-JiraIssueAttachment -Issue $request).content[0] -OutFile $path.$request.txt


but then I got another error 


Invoke-JiraMethod : Cannot process argument transformation on parameter 'URI'. Cannot convert value "h" to type "System.Uri". Error: "Invalid cast from
'System.Char' to 'System.Uri'."
At line:1 char:24
+ ... Method -Uri (Get-JiraIssueAttachment -Issue $request).content[0] -Out ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Invoke-JiraMethod], ParameterBindingArgumentTransformationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,Invoke-JiraMethod


The attachment is a simple CSV file, so I don't know what is going on. So strange that if the attachment is a TXT file, sometimes it can get through.

Please help.




2 answers

Did you have any luck with this mate?

Suggest an answer

Log in or Sign up to answer