I have been fiddling with a large number of virtual machines in the last week or so in an environment that does not have a full System Center deployment and where an automated build process is not currently in place resulting in new servers being presented in their OOBE state using (Windows) internally generated names.
Clearly I needed to rename the servers to align with the prescribed standard. Not to worry. Need to rename a bunch of computers quickly? PowerShell to the rescue!
The simple version of the script I used is as follows:
$currentservername = Get-WMIObject Win32_ComputerSystem
Bam! Literally could not be simpler.
I had this scriptlet wrapped up into some more complex stuff that automatically updated other things as well, I might save some of them for another post.
more to follow…