VirtualNoitall
Virtuoso
Virtuoso

Query for snapshots that were taken when the VM was running?

Is there a property of a snaphot I can query via powershell to find VMs with snapshots taken while the VM was running? These appear in VC, in snapshot manager, with a little "play" arrow beside them. I would like to find these because they cause problems if the running snap was taken on esx 3.02 and they try to revert after we move them to esx 3.5.

Thanks!

Andrew

0 Kudos
3 Replies
admin
Immortal
Immortal

Is there a property of a snaphot I can query via powershell to find VMs with snapshots taken while the VM was running? These appear in VC, in snapshot manager, with a little "play" arrow beside them. I would like to find these because they cause problems if the running snap was taken on esx 3.02 and they try to revert after we move them to esx 3.5.

Thanks!

Andrew

If you just want the names of the VMs rather than the names of the snapshots:

get-vm | where { $_ | get-snapshot | where { $_.PowerState -eq "PoweredOn" } }

halr9000
Commander
Commander

I think you can use the PowerState property of a snapshot object.

get-vm | get-snapshot | ft { $_.vm.name },name,powerstate

Hal Rottenberg

Co-Host, PowerScripting Podcast (http://powerscripting.net)

My signature used to be pretty, but then the forum software broked it. vExpert. Microsoft MVP (Windows PowerShell). Author, Podcaster, Speaker. I'm @halr9000
VirtualNoitall
Virtuoso
Virtuoso

Thanks very much to both posters. I just came upon this myself aswell after I found out about "| gm" to list the properties and methods.

0 Kudos