Welcome to StarWind Forum and thanks for sharing the script. Sadly, VM conversion is not available in CLI.
We are planning to introduce bulk conversions via GUI in future builds. Stay tuned!
The Latest Gartner® Magic Quadrant™Hyperconverged Infrastructure Software