Great script, but the datastore totals don't seem correct? Here is what I got;
13 Datastores with a total of 1055 GB of disk space
| Datastore Name | Total Disk Space (in GB) | Current Usage % | Number of VMs contained | Commitment % |
| datastore1 | 274 GB | 1% | 0 | 0% |
| datastore1 (1) | 62 GB | 2% | 0 | 2% |
| datastore1 (2) | 62 GB | 2% | 0 | 2% |
| datastore1 (3) | 62 GB | 2% | 0 | 2% |
| Local Storage (Do Not Use) | 62 GB | 2% | 0 | 2% |
| S1-XXXXX | 700 GB | 96% | 23 | 146% |
| S1-XXXXX | 360 GB | 88% | 18 | 159% |
| S1-XXXXX | 300 GB | 84% | 1 | 84% |
| S1-XXXXX | 1100 GB | 87% | 27 | 111% |
| S1-XXXXX | 420 GB | 76% | 2 | 95% |
| S1-XXXXX | 1000 GB | 95% | 7 | 102% |
| S1-XXXX | 1000 GB | 92% | 19 | 118% |
| S1-XXXX | 100 GB | 84% | 1 | 83% |
Clearly I have more than 1055GB Allocated.
The other thing I'd like to know is if there is a way to exclude certain data stores from the script?
I'd like to remove all local host storage, so only my SAN shows in the report.