can i change the hostname when spinning a vm from template in vcenter?
Yes you can change but to take change in effect you need to restart network service. At this time all network related operation will get impacted.
Thanks,
DJ
Try Customize wizard to explore more options
Thanks. What I'm looking for is doing that in cmd line, using the vmware command tools.
Mike Laverick posted this some time ago for use in PowerCLI:
New-VM -Name NEW_VM_HOSTNAME -Template win2012-R2 -Datastore platinum -ResourcePool GoldCluster01 -Location CorpHQ -OSCustomizationSpec “Windows 2012 R2 – CorpHQ” Start-VM NEW_VM_HOSTNAME