1

How do I export the output in powershell screen and save it as a image? To save the output as a text file I use the command below:

script.ps1 >> output.txt

I would want the output to be saved as a screenshot or image. Tried exporting as:

script.ps1 >> output.png

The image doesn't open

boxdog
  • 7,894
  • 2
  • 18
  • 27
  • How do you expect the image to be? the console it self? – Shadowfax Jul 12 '19 at 06:30
  • Yes. A screenshot of the console itself. – user11753358 Jul 12 '19 at 08:29
  • I am not sure how you would take a screenshot of just the Powershell console, but you could take one of the entire screen: [How can I do a screen capture in Windows PowerShell?](https://stackoverflow.com/questions/2969321/how-can-i-do-a-screen-capture-in-windows-powershell) – techguy1029 Jul 15 '19 at 18:18

1 Answers1

1

This might point you in the right direction. Although it does not it does not directly output the console to a png file you could output the console to a txt file and then using Get-Content export this to a png file

https://www.reddit.com/r/PowerShell/comments/8rg3hc/exportpng/

Simon B
  • 210
  • 1
  • 5