In earlier part Solved: VMware Snapshots Virtual Machines disks consolidation is needed I performed steps on vCenter Portal GUI. Here I will use VMware PowerCLI to perform the same steps to automate it.
First step is to connect to vCenter server using command Connect-VIServer. Use below comm…