VMware PowerCLI

The Best User Interface for your VMware Datacenter!

Improve Get-EsxCli V2 error messages

Currently the error messages produced by Get-EsxCli are often non-indicative of what is actually wrong.
As an example, when one mistypes the case of a key in the argument hash table, the error message states:

"Index (zero based) must be greater than or equal to zero and less than the size of the argument list."

instead of a simple "Unknown key" or "Case on parameter is incorrect".

Even better would of course be to make the keys case-insensitive.

For a practical example, see PowerCLI to modify QFullSampleSize and QFullThreshold

PS: when one knows what the actual error is, the message does make sense, but in a not too obvious way I'm afraid.

  • Luc Dekens
  • Dec 15 2018
  • Looking for Feedback
  • Attach files