Last active
November 19, 2018 18:45
-
-
Save Dapacruz/98540fd8c10af5ee115ef2e23626fe6e to your computer and use it in GitHub Desktop.
Get a VM snapshot report and output to clipboard, CSV or console.
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
## CSV format out to clipboard | |
Get-Snapshot -VM * | select VM,Name,Created,PowerState,Description,@{n='SizeGB';e={'{0:N2}' -f $_.sizegb}} | sort SizeGB | ConvertTo-Csv -NoTypeInformation -Delimiter `t | clip | |
## Out to CSV | |
Get-Snapshot -VM * | select VM,Name,Created,PowerState,Description,@{n='SizeGB';e={'{0:N2}' -f $_.sizegb}} | sort SizeGB | Export-Csv -NoTypeInformation -Path 'VMware Virtual Machine Snapshots.csv' | |
## Out to console | |
Get-Snapshot -VM * | select VM,Name,Created,PowerState,Description,@{n='SizeGB';e={'{0:N2}' -f $_.sizegb}} | sort SizeGB | ft -auto |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment