This script has a function that allows you to take a screenshot of the entire desktop or of an active window.  Also includes option to save the screenshot to a file. I worked with this when trying to print out a windows form and could not find any suitable means to do so.  I know that there are better ways that do not require c# code to print out a screen, but figured I might as well cover all of the bases to make this work out.

26Aug2010: Added functionality to send screenshot directly to a default printer.

 

PowerShell
Edit|Remove
. .\Take-ScreenShot.ps1
 

PowerShell
Edit|Remove
Take-ScreenShot -screen -file "C:\image.png" -imagetype png