Skip to content

Instantly share code, notes, and snippets.

View AlexJamesHaines's full-sized avatar

Alex 'Freedom' Haines AlexJamesHaines

View GitHub Profile
@ArtikusHG
ArtikusHG / StoPetya.bat
Last active June 29, 2017 06:23 — forked from ujeenator/stop-petya.bat
A simple batch script to stop the petya ransomware from encrypting files.
@echo off
cls
color 02
echo Welcome to StoPetya!
echo Please make sure you're running this script with admin rights.
echo Press any key to fix the petya ransomware...
pause >NUL
color 04
cls
echo Deleting fies...
@BenjaminArmstrong
BenjaminArmstrong / SaveVMBitmap.ps1
Last active June 18, 2024 02:35
Sample PowerShell script that shows you how to create a .BMP file of the display of a Hyper-V virtual machine.
$VMName = "VM 1"
$BMPName = "C:\Users\benja\Desktop\test.bmp"
Add-Type -AssemblyName "System.Drawing"
$VMCS = Get-WmiObject -Namespace root\virtualization\v2 -Class Msvm_ComputerSystem -Filter "ElementName='$($VMName)'"
# Get the resolution of the screen at the moment
$video = $VMCS.GetRelated("Msvm_VideoHead")
$xResolution = $video.CurrentHorizontalResolution[0]