Categories

#PSTip Capture console screen

PowerShell has many logging capabilities but sometimes what you want is to capture what’s already written to the console. Capturing this information can be a challenge as you need to script the console buffer content. You can see how in this post by the PowerShell team blog. In the ISE however this task becomes a lot easier; it is just a matter of reading the content of the output (console) pane.

Like this:

About the author: Shay Levy

Shay Levy is a Co-founder and editor of the PowerShell Magazine. He is a multiple-year recipient of the Microsoft MVP award, and a Microsoft Certified Trainer (MCT). Shay often covers PowerShell related topics on his blog and you can also follow him on Twitter at @ShayLevy