Scripts
documentation
ESX Service Console
RTFM ESX 3.x Service Console Guide
ESX 2.3 scripting API users manual
ESX3i Remote CLI documentation
vmrun
Using vmrun one can automate ESX3.5/ESXi virtual machines as well as virtual machines on VMware Server 2.0
vmrun API guide but see also the VIX page for more details.
vmrun scripts
Scripts to execute to automate actions in your guest.