Thursday, July 24, 2014

Renaming a Reverse-Imaged Operating System

Often times after reverse-imaging a PVS-based member-server's *.vhd back to a "physical" disk there might be the desire to change the computer's name or domain membership.

I have seen on a few occassions that the ability to do this is compromised. Usually both the Computer name and the  Member of fields are greyed out when one of the issues outlined below is encountered. Additionally, the device may or may not let your add or remove features via either the GUI or PowerShell's Add-WindowsFeature cmdlet. You may also not be able to run SysPrep due to a "fatal error." In each instance, the host operating system may state that a reboot is pending - even after one has just completed!

Sample where the domain/workgroup affiliation cannot be changed.
Before panicking and rebuilding your image from scratch - run through these items to see if there are errors on any. Any one of these could halt your ability to rename the workstation.


  1. Do you have appropriate permissions to modify these settings?
    • Are you an administrator on the server? Are policies preventing this action? Try as the local device administrator - if you see the same issues here you most likely can continue.
  2. Is the Workstation service running? 
    • This service is required to communicate with the domain and if it is not running you will have a bad time.
  3. On the device's network interface, is Client for Microsoft Networks in use?
    • You will again have issues if there is a problem with this component. If it is not attached to your controller, add it. If it is, try uninstalling it (requires reboot) and reinstalling it once the server is back up.
  4. Is the device "stuck" mid-rename? 
    • This is a little bit trickier but still in the end fairly straight forward. When at the logon screen, if you use the local machine login characters (.\) does the machine name you see match the one in the Computer name/Domain changes GUI? If you open the CLI and type set (cmd) or $env:computername (PS) does the computername variable match both of these? If any of these are a mismatch, check out the keys in:
      HKLM//System/CurrentControlSet/Control/ComputerName
      If the values in ActiveComputerName and ComputerName do not match, the server thinks there is a pending reboot for a server name change. If a reboot has not set them to be identical, change them to match and reboot again.
Depending on the nature of failure that caused the server to not allow modifications to the Computer name/Domain changes GUI, one of these items should be the culprit. 

Just remember to keep in mind, if this is a XenApp server, if you had run the image prep tool previously, the next time IMA runs it will join the farm and you cannot simply rename a XenApp server that is joined to a farm without properly preparing it. If after you run the image prep tool you disable the IMA service so it does not run, you do not have to worry about this biting you. Just set the service back to automatic and reboot to have your renamed machine join the farm again. 

Finally, depending what you are trying to accomplish and what software is installed, don't forget about security identifiers and the need to properly prepare an image (SysPrep). 

No comments:

Post a Comment