Cluster VMs Hard Drive info

Hi all,

My first dealings with PS here. Complete newbie. I’m looking for a quick and easy way of finding out which of my VMs (in a HV Cluster) have dynamically expanding hard drives. I don’t particularly want to open each VM settings to take a look… there are hundreds of them! Was hopng that Powershell would be able to pull that info for me.

Thanks,
Peter

 

you would be able to, but do you have any code which you tried to achieve and got in to some issue with it ?

Get-Command is your friend.

Get-Command -Module hyper-v That should be all you need to query hard disk information.

pwshliquori

when you crosspost in different forums at the same time you should place links to the other posts you did in the other forums to let the people willing to help you know that there might be already more information or even already a solution

https://social.technet.microsoft.com/Forums/en-US/768d2970-3023-4cf0-97e3-34960f42b57e/hv-cluster-hard-drive-information?forum=winserverpowershell#b27a124d-2502-4e82-81e3-b9ebfe33292c

Found the solution elsewhere…

Get-VM –VMname * | Select-Object VMId | Get-VHD | ConvertTo-HTML –Property path,computername,vhdtype,
@{label='Size(GB)';expression={$_.filesize/1gb –as [int]}} > “C:\SimpleVHDReport.htm"

Kudos to Luke Orellana on https://www.altaro.com/hyper-v/gathering-vhd-info-get-vhd-powershell/ for a wonderful, easy page to follow :slight_smile: