I found a script on the forums that seems to be close to what I am looking for, but doesn't return anything but an error which is the throw part. I am thinking I am just getting no results from the beginning and don't understand why. I am new to this. So for actions I have one called findTestDatastore that is supposed to look in our Non-Production Cluster (it is called that), then find the datastore with the highest amount of free space where the name of the datastore begins with hds-esxi-ucs-04. In the workflow I added it and put an output of bestDataStore, but it throws the error No datastore found which has over 25% free space which is untrue. Attached is the code.
↧