Windows screen shots via command-line SSH session

command linescreenshotsshwindows

I've browsed the handful of "screen capture" queries here, but I was unable to find anything which addressed my specific need.

I'm looking for a command-line tool that I can run via remote SSH connection (by way of the cygwin sshd daemon). There are several to choose from, but the few I've tried (ImageMagick, nircmd, and MiniCap) all result in a blank screen. I assume that this is due to the remotely logged in user not having a proper graphical console session running.

The goal here is automate screen capture and retrieval of the main system console (what one would see if they were looking at the physical monitor) through the use of ssh script from a Unix host:

ssh user@windowshost "screencap --output /tmp/console.jpg"
scp user@windowshost:/tmp/console.jpg /some/destdir

Note that these must be done on demand, so polling a remote directory that has snapshots dumped periodically will not work.

Bonus points for programs that are open source and have a portable install (so I don't need to RDP/VNC into the machine to run a graphical installer).

Best Answer

If you already have VNC on the machine you may try to make screenshots through VNC, e.g. with VNC Snapshot.

Related Question