VMware Cloud Community
TheVMinator
Expert
Expert
Jump to solution

List virtual machines by hard drive size

How can I list the virtual machines that have a single hard drive greater than 50GB?  If they have a total of all hard drives greater than 50GB, I DONT want to list them.

Thanks!

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You mean something like this ?

Get-VM | Get-HardDisk | where {$_.CapacityGB -gt 50} |

Select @{N="VM";E={$_.Parent.Name}},Name,CapacityGB


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

View solution in original post

Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

You mean something like this ?

Get-VM | Get-HardDisk | where {$_.CapacityGB -gt 50} |

Select @{N="VM";E={$_.Parent.Name}},Name,CapacityGB


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

Reply
0 Kudos
TheVMinator
Expert
Expert
Jump to solution

Ok great thanks

Reply
0 Kudos