Last active
February 25, 2017 22:06
-
-
Save simonjgreen/fc2feeb98b27a5516729bf290c82172e to your computer and use it in GitHub Desktop.
PowerCLI function to get a report on all snapshots with detail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-SnapshotReport { | |
Get-VM | Sort-Object | Get-Snapshot | Where-Object {$_.Created -lt (Get-Date).AddDays(-28)} | Format-Table VM, Created, @{Name="Size GB"; Expression={$_.SizeGB}; FormatString="N1"}, ParentSnapshot, Name, Description, PowerState -AutoSize | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment