VMWare - Create a snapshot of a virtual machine using PowerCLI

by
Jeremy Canfield |
Updated: March 09 2020
| VMWare articles
- Download and install PowerCLI from www.vmware.com.
- In PowerCLI, using the following command to connect to your ESXi hypervisor:
Connect-VIServer -Server server_name -User username -Password password
- Use the Get-VM command to list the Virtual Machines installed on the hypervisor.
Get-VM
Name PowerState Num CPUs MemoryGB
---- ----------- --- ---- --------
CentOS-FS1 PowerOn 1 1.000
Windows-WebSrv PowerOff 1 4.000
- Let's say we want to create a Snapshot of CentOS-FS1. Use the Get-Snapshot -VM CentOS-FS1 command to create a new snapshot. If there is no output, this means there are no Snapshots for the specified virtual machine.
Get-Snapshot -VM CentOS-FS1
- Use the New-Snapshot -VM CentOS-FS1 -Name ExampleSS command to create a new snapshot. -Name ExampleSS is the name of the new snapshot.
New-Snapshot -VM CentOS-FS1 -Name ExampleSS
Note: If message "current license or ESXi versin prohibits execution of the requested operation", this suggests you are probably using the free version of ESXi. The free version of ESXi does not allow the execution of the New-Snapshot cmdlet.
Did you find this article helpful?
If so, consider buying me a coffee over at