Hi Peter,
Why don't you use host profiles? Or does this not allow your license?
If you want to script the whole configuration of multiple hosts, this might help: Automate ESXI Host Configuration with PowerCLI and CSV - The Art of Information Technology