david-c
8/29/2017 - 11:27 PM

Get a VM snapshot report and output to clipboard, CSV or console.

Get a VM snapshot report and output to clipboard, CSV or console.

## CSV format out to clipboard
Get-Snapshot -VM * | ? { $_.PowerState -match 'PoweredOn' } | select VM,Name,Description,SizeGB | ConvertTo-Csv -NoTypeInformation | Out-Clipboard

## Out to CSV
Get-Snapshot -VM * | ? { $_.PowerState -match 'PoweredOn' } | select VM,Name,Description,SizeGB | Export-Csv -NoTypeInformation -Path snapshots.csv

## Out to console
Get-Snapshot -VM * | ? { $_.PowerState -match 'PoweredOn' } | select VM,Name,Description,@{n='SizeGB';e={'{0:N2}' -f $_.sizegb}} | ft -auto