Reputation: 11
I am using invoke-restmethod GET
in Powershell which produces a PDF file as a response.
I can see that file as an encoded format in the PowerShell window.
I need to create a PDF file from the response.
How to achieve?
Upvotes: 0
Views: 1731
Reputation: 174575
Use the -OutFile
parameter:
Invoke-RestMethod $uri -Method Get -OutFile output.pdf
Upvotes: 2