ESXi 6.5 provides many options for using PXE to boot the installer and using an installation or upgrade script.
For information about setting up a PXE infrastructure, see PXE Booting the ESXi Installer.
For information about creating and locating an installation script, see About Installation and Upgrade Scripts.
For specific procedures to use PXE to boot the ESXi installer and use an installation script, see one of the following topics:
For information about using vSphere Auto Deploy to perform a scripted upgrade by using PXE to boot, see Using vSphere Auto Deploy to Reprovision Hosts.