Skip to content

Instantly share code, notes, and snippets.

View jdhitsolutions's full-sized avatar

Jeff Hicks jdhitsolutions

View GitHub Profile
@jdhitsolutions
jdhitsolutions / SaveVMBitmap.ps1
Last active November 27, 2020 21:16 — 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.
function Get-VMScreenBMP {
[cmdletbinding()]
Param(
[string]$VMName,
[string]$Computername = $env:computername,
[string]$Path,
[switch]$Passthru
)
$VMMS = Get-WmiObject -Namespace root\virtualization\v2 -Class Msvm_VirtualSystemManagementService -ComputerName $Computername