- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following PowerCLI code will give you the sum of the sizes of all snapshots of a VM:
(Get-Snapshot -VM $VM | Measure-Object -Property SizeGB -Sum).Sum
If you want to get a list of all the individual snapshot sizes then you can use:
[string]::Join(' ',(Get-Snapshot -VM $VM | Sort-Object -Property Created | ForEach-Object {$_.SizeGB}))
Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition