The easy way is to use the GUI. To get hard disk sizes for your VM's:
(Get-VM VMName).Harddisks
This will list all disks associated with the VM. Add these numbers together with the amount of RAM you have allocated to the VM and you get how much space the VM is taking up on a datastore. Below shows how you can add it all together.
((Get-VM VMName).Harddisks | foreach {$_.CapacityKB / 1kb} | measure-object -sum).sum + (get-vm vmname).MemoryMB
More efficiently and faster would look like below:
$VMName = Get-VM VMName
($VMName.Harddisks | foreach {$_.CapacityKB / 1kb} | measure-object -sum).sum + $VMName.MemoryMB
K. Chris Nakagaki (Zsoldier)
http://tech.zsoldier.com