PowerCli Script to monitor number of snapshots for VMs in a vCenter Server

VMWare supports a maximum of 32 snapshots per VMs. But we have seen cases where customer have more than 200 snapshots for a given VM, which can cause a stack overflow when VC service is coming up.

Last year I worked on a case for a customer, where they ran into production down situation because of this issue. So, I developed this script to monitor number of snaphots a VM is having.

The script will take the vCenter Server IP, username and password as the argument. It will go through all the VMs managed by that vCenter and generates file which contains the name of the VMs and the number of snapshots, which exceeds the limit of 32. It will also sends an email to the given email id with the generated file as an attachment.

Sign in to be able to add comments.

Comments 0