Check this: VMware Knowledge Base
Welcome to the Community,
for ESXi hosts that are managed by vCenter Server, you have two option (depending on the license edition):
Which version of ESXi you're using ??
If you can run it, I recommend "Host profiles" solution proposed by a.p.
I got to test it in the production environment. With positive result.
I also made two articles in my blog about it (in Italian)