VMware Cloud Community
esxinoob
Enthusiast
Enthusiast
Jump to solution

Output of Get-Vm

Hi

How can I show the whole path of the Virtual Disk File (See attachement)?

Regards

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

The default PowerShell output engine tries to place as much info as possible on the console.

You can pipe the results to Format-List, where each property will be on a separate line.

Or you can pipe the result to Format-Table -AutoSize


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
4 Replies
LucD
Leadership
Leadership
Jump to solution

The default PowerShell output engine tries to place as much info as possible on the console.

You can pipe the results to Format-List, where each property will be on a separate line.

Or you can pipe the result to Format-Table -AutoSize


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
esxinoob
Enthusiast
Enthusiast
Jump to solution

Thanks a lot.

Is there a way to show which VM is using the disk file?

-> I can only see where the vmdk s located, but I don't see which VM is using the vmdk file...

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Try something like this

Get-VM | Get-HardDisk | 
Where {$_.Filename -match "Windows Server 2008 R2.vmdk"} | 
Select
@{N="VM";E={$_.Parent.Name}},Filename


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
esxinoob
Enthusiast
Enthusiast
Jump to solution

Does work, thank you!

0 Kudos