Hello Community!
I am doing my research this morning in the community, but hopefully the community can save me some time. I am looking to have a vSphere Power Cli script to report datastore inventory information. Here is what I would like the script to do
connect to vi, report the following and export it to a csv file.
Cluster Name | ESXI host | Datastore name | Total Capacity (GB) | Free (GB) | Used |
Thanks everyone
~Everett
Perhaps not exactly what you want, but the script in my LUN report – datastore, RDM and node visibility post could be a start.
It won't be too hard to add the Free and Used space for datastores.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yeah not exactly what I was looking for. This can be handy for something else, but the size is reporting in mb instead of GB.
P.S. I am was getting a message. I am not sure if it is an error but more informational..
Here it is
Cannot index into a null array.
At C:\CLI_Scripts\test\Datastore_reporting.ps1:40 char:36
+ $scsiTab[$key] = $scsiTab[$key][ <<<< 0], $dsName, $scsiTab[$key][2]
+ CategoryInfo : InvalidOperation: (0:Int32) [], RuntimeException
+ FullyQualifiedErrorId : NullArray