Useful Powershell Hyper-V Commands

After using Hyper-V for sometime now, I’ve got used to management without the GUI. You can find below some useful PowerShell commands that should get you started managing your server.

Start and Stopping a Virtual Machine

//Start a Virtual Machine called VMName
start-vm VMName
//Stop a Virtual Machine called VMName
stop-vm VMName

List all Virtual Machines on the server

//List all Virtual Machines

Create a Snapshot for a Virtual Machine

//Create a snapshot of the selected VM.
checkpoint-vm -VMName "Your VM Name Here"

List all Hyper-V Snapshots on the server

//List Hyper-V Snapshots..
get-vmsnapshot *

List all Hyper-V Snapshots for a given VM

//List a Virtual Machines Snapshots
get-vm "Your VM Name" | get-vmsnapshot

Validate the Virtual Machines VHD

//Validate a VMs Hard Drive
dir C:\VHDs | Select Name,@{n="Test";Expression={ Test-VHD $_.fullname}} | sort Test


Web Developer, IT enthusiast & PC Gamer.

Leave a Reply

Your email address will not be published. Required fields are marked *