Weekly Tip 42

Snapshot all Hyper-V VMs on a Host

Execute this script. Change the “$hosts =” line to reflect the name of your host. You can also modify the date format if you like on the “$date =” line.

import-module hyper-v

$host = “<host name>”

$date =  get-date -format yyyy-mm-ddThh-mm-ss

$vms = (get-vm -computername $host).name

ForEach ($vm in $vms) {

checkpoint-vm $vm -computername $host -snapshotname “$vm $date”

write-host “checkpoint created on $vm”

}

Share:

Facebook
Twitter
LinkedIn
Picture of Matt Tinney

Matt Tinney

Professional IT executive & business leader having decades of experience with Microsoft technologies delivering modern-day cloud & security solutions.

Contact Us

=
On Key

More Posts

WME Cybersecurity Briefings No. 024
Cyber Security

WME Security Briefing 28 August 2024

GhostWrite Vulnerability in T-Head CPUs Exposes Devices to Unrestricted Access Overview A critical architectural flaw in T-Head’s XuanTie C910 and C920 RISC-V CPUs was uncovered by recent research from the CISPA Helmholtz Center for Information Security. Dubbed GhostWrite, the vulnerability

Click Here to Read Full Article »
Be assured of everything

Get WME Services

Stay ahead of the competition with our Professional IT offerings.

=