I have a script that can list all the snapshots on vcenter
get-vm | get-snapshot | Select-Object -Property vm,created,sizeGB,name,description | Export-Csv -Path 'C:\Scripts\snapshot\snapshots.csv' -NoTypeInformation -Delimiter ";"
is it possible to add cluster information into it?
Sure, try like this
Get-Cluster -PipelineVariable cluster |
Get-VM | Get-Snapshot |
select @{N='VM';E={$_.VM.Name}}, Name, Description, Created, SizeGB,
@{N='Cluster';E={$cluster.Name}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
wow, I would have never thought of that.
Thank you!