misc/powershell/snapshots4everyone.ps1

7 lines
263 B
PowerShell
Raw Normal View History

vboxland
./VBoxManage list vms |
Select-String -Pattern "\{[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}\}" |
Foreach-Object {
$vmName = """$($_.Matches[0])"""
./VBoxManage.exe snapshot $vmName take "$(Get-Date -Format "yyyy-MM-ddThh-mm-ss.ffff")"
}