How can I change the hostname of a Windows server using a script?
Doing this on a Linux server is very straightforward (change a couple file entries, and run the hostname
command), but I don't know how, or even if it's possible, to change a hostname on Windows in an automated fashion.
Specifically I'm looking for a way to do this on Windows 2008 R2, but a generic approach would be great, too.
I found this technote for XP, but haven't tried it on a 2k8 machine - is it still valid?
The entire context is to be able to change a server's name post-deployment from a VMware template without using a Custom Specification.