VMware Cloud Community
ganapa2000
Hot Shot
Hot Shot
Jump to solution

VM Folder Name is not showing.

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.

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

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

View solution in original post

0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

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

0 Kudos
ganapa2000
Hot Shot
Hot Shot
Jump to solution

Thanks a lot LucD Smiley Happy

0 Kudos