Link to home
Start Free TrialLog in
Avatar of gateguard
gateguard

asked on

Is there a vSphere CLI command that lists all the snapshots on a given ESXi VM?

Using vmware-cmd.pl  -l     I list all the vm's on an ESXi server.

Is there a command to list all the snapshots (and hopefully all their notes) on each of the vm's?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Availailble in the VMware Community Pack

 User generated image
There is a PowerCLI script:
Get-VM | Get-Snapshot | Select VM, Name, Description, Created

Regards,
~coolsport00
Yes powercli is likely the best bet. For example:

[vSphere PowerCLI] C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI
> get-vm vshieldmgr | get-snapshot | fl *


Description       : two
Created           : 5/6/2011 8:22:40 PM
Quiesced          : False
PowerState        : PoweredOn
VM                : vShieldMgr
VMId              : VirtualMachine-vm-1643
Parent            :
ParentSnapshotId  :
Children          :
SizeMB            : 11269.11
IsCurrent         : True
IsReplaySupported : False
Id                : VirtualMachineSnapshot-snapshot-1808
Name              : one



[vSphere PowerCLI] C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI
>

otherwise you would have to use the vifl.pl from the last question and look for filenames that indicate it is a snapshot
or use the VMware Community Pack for everthing. (if you prefer GUIs)
Avatar of gateguard
gateguard

ASKER

Thanks.