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

Posted on 2011-05-06
Last Modified: 2012-05-11
Using  -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?

Question by:gateguard
    LVL 116

    Accepted Solution

    I would recommend using the following tools, also VMware recommends the use of PowerCLI, which is PowerShell interface with vSphere-specific additions.

    One of the simplest PowerCLI examples, and something which is actually extremely useful on its own, is the Get-VM cmdlet. Which lists VMs.

    PowerCLI can be a bit overwhelming to use,  But it can be enhanced with a nice toolset and a library of preconfigured scripts to jump-start your mass changes, which is possible with PowerGUI


    VMware Community Pack

    It's also worth looking at The free VMware Guest Console

    The free VMware Guest Console, an experimental application created by VMware Labs, is a great tool for managing vSphere VM processes and files. You can view, sort and kill processes across all VMs, and you can also run a script on all Windows or Linux VMs.
    LVL 116

    Expert Comment

    by:Andrew Hancock (VMware vExpert / EE MVE)
    Availailble in the VMware Community Pack

     Snapshots in VMware Community Pack
    LVL 40

    Expert Comment

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

    LVL 28

    Expert Comment

    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

    LVL 28

    Expert Comment

    otherwise you would have to use the from the last question and look for filenames that indicate it is a snapshot
    LVL 116

    Expert Comment

    by:Andrew Hancock (VMware vExpert / EE MVE)
    or use the VMware Community Pack for everthing. (if you prefer GUIs)

    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Suggested Solutions

    Title # Comments Views Activity
    vSphere client error 503 5 54
    Netapp Snapshots 3 20
    vCenter server failed to start 22 40
    poor IIS performance on VM 6 24
    In VMware vSphere 4 1 and 5.0, if you have two or more hosts, using shared storage, (SAN/NAS) you can create a VMware vSphere Cluster and enable High Availability mode (HA), if you have the correct VMware vSphere Licensing. VMware vSphere High Av…
    This article is an update and follow-up of my previous article:   Storage 101: common concepts in the IT enterprise storage This time, I expand on more frequently used storage concepts.
    Teach the user how to delpoy the vCenter Server Appliance and how to configure its network settings Deploy OVF: Open VM console and configure networking:
    This Micro Tutorial walks you through using a remote console to access a server and install ESXi 5.1. This example is showing remote access and installation using a Dell server. The hypervisor is the very first component of your virtual infrastructu…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now