Hi,
Please help, I am unable to get the Folder details of a VMs, in the below script.
Get-VM | Get-Snapshot | Select VM,Name,@{N="Folder";E={$_.Parent.Folder.Name}},@{N="SizeGB";E={@([math]::Round($_.SizeGB))}},Created
When I execute, Folder Name returns blank.
Try like this
Get-VM | Get-Snapshot | Select VM,Name,@{N="Folder";E={$_.VM.Folder.Name}},@{N="SizeGB";E={@([math]::Round($_.SizeGB))}},Created
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Try like this
Get-VM | Get-Snapshot | Select VM,Name,@{N="Folder";E={$_.VM.Folder.Name}},@{N="SizeGB";E={@([math]::Round($_.SizeGB))}},Created
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks a lot LucD