Hi guys,
I need a script to generate a csv report for each VM in vCenter listing the total size of the vmdks provisioned to each VM based on the name of the datastore where the VMDK resides.
Some of our datastore names start with the number “1” (Example 1stroage)
For example, if a VM has 2 X 20GB vmdks that reside on the datastores whose names DON'T start with the number 1 and the VM also has three other 50 GB vmdks that reside on the datastores whose names DO start with the number 1, the report should list the VM name and 2 columns, the first one will say "All datastores" and will have 40GB as a total size of the first two VMDKs and the second column will say "Datastore 1" and will have 150GB as a total size of the 3 other VM's VMDKs.
Thanks!