Hey Guys, I need help with a script... I need to get a list of how much space each VM is using on each datastore. I only need this from a select list of VMs. These VMs are all in the sa...
See more...
Hey Guys, I need help with a script... I need to get a list of how much space each VM is using on each datastore. I only need this from a select list of VMs. These VMs are all in the same folder, however this folder exists under 3 differnet parent folders (Development, Staging and Production). Each VM has a VMDK on 3 datastores and I need to see how big each VMDK is (they are thin provisioned disks.) I came up with the script below, but it only gives me totals for the different datastores and not a value for each VM... get-Datastore -VM (Get-VM -Location (get-Folder Development)) | select Name,@{N="i3 Cube";E={$_.Folder.Name}} | Sort-Object Name | export-CSV "c:\Cube.csv" If I do Get-Datastore -VM (Get-VM -Name VMNAME) it works... so i need to figure out the get-VM part that will pull a list of... Development\FOLDER Staging\FOLDER Production\FOLDER If I wasn't in a hurry for the info, I'd try to figure it out on my own... Thanks in advance!! - Ben