Recently a client asked me to build a series of virtual machines for them for a project we were working on. No problem… I asked what they should be named, and the client told me to call them whatever sounded right.
That did not sound right… or at least, it turned out to not be right. Indeed, the client had an approved server naming convention, and when the manager saw my virtual machines named VM1, VM2, VM3, and so on… he asked me to change them.
If we were talking about a single server, I would have logged in and done it through Server Manager. But there were fifteen machines in play, so I opted to use Windows PowerShell from my desktop.
Rename-Computer –ComputerName “VM1.domain.com” –NewName “ClientName.domain.com” –DomainCredential domain\Mitch –Restart
The cmdlet is pretty simple, and allowed me to knock off all fifteen servers in three minutes. All I needed was the real names… and of course my domain credentials.
The cmdlet works just as well with the –LocalCredential switch… in case you aren’t domain joined.
That’s it… have fun!