Skip to content

Instantly share code, notes, and snippets.

@Eric2XU
Eric2XU / SaveVMBitmap.ps1
Last active May 22, 2018 12:34 — forked from BenjaminArmstrong/SaveVMBitmap.ps1
Sample PowerShell script that shows you how to create a .BMP file of the display of a Hyper-V virtual machine.
# This script wouldn't be possible without the orginal work done by
# Ben Armstrong, https://blogs.msdn.microsoft.com/virtual_pc_guy/2016/05/27/capturing-a-hyper-v-vm-screen-to-a-file/
# My version improves image file size by using JPEG and also creates a complete
# script that will created images for a given time frame
#####################
# Script House Keeping
#####################
$Error.Clear()
Clear-Host