List Virtual Machine Snapshots

Piece of cake ! 🙂

Get-Vm | Get-Snapshot | select vm, name, created, size

But, if you want to dress it up with a GridView :

————————————————————–

############################################
# Build a complete VM Snapshot List
#
# http://.virtualpad.wordpress.com
############################################
$Datos=@()
$VMList=Get-VM
Foreach ($VM in $VMList)
{ $D = $VM | Get-Snapshot
$Dato= “” | Select VM, NAME, CREATED, SIZE
$Dato.VM = $D.VM
$Dato.Name = $D.Name
$Dato.Created = $D.Created
$Dato.Size = $D.Size
$Datos += $Dato
}

$Datos | Out-Gridview

—————————- End of ps1 ——————–

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s