Renaming PC Not Working

  • Hello. I've started to build and deploy my PC images for the summer and I came across an issue that I wanted to get some advice on. I've been using the same unattend.xml file since 2016 and this morning, I tried to deploy an uploaded image to a PC and everything went well except that it didn't rename the PC. Instead, it renamed the PC to a random name. I have an unattend.xml file located in C:\Windows\System32\Sysprep\ and inside the .xml, under the Specialize pass, I have a the tag <ComputerName>CloneDeploy</ComputerName>. After the image has finished deploying to a PC, i see the following messages appear so I believe the .xml is set up correctly. Any suggestions as to why the renaming isn't taking place? I'm using Windows 10 v1803 x64. Attached is my .xml. Thanks!

    Changing Computer Name On /dev/sda2
    mkdir: cannot create directory '/mnt/ntfs': File exists
    ...Found Answer File At /Windows/Panther/unattend.xml, Changing Computer Name.
    Closing Active Task

  • Doesn't really make sense, unless something changed in 1803. Even if the rename failed, the name of your computer should be CloneDeploy since that's what you specified in the answer file, it shouldn't be random. Can you try deploying without changing the name, in the image profile deploy options uncheck change computer name, that way CloneDeploy will not touch the answer file. The computer should be named CloneDeploy in the end since it's in your answer file.

  • Ok, here's an update for you. I first deployed last year's uploaded image, which is Windows 10 v1703 x64. Everything went fine because the computer joined to my domain and it was named correctly. I then modified the profile associated with the v1803 image so it does not change the computer name(Image Name->Profiles->View->Deploy Options, unchecked 'Change Computer Name'). I then deployed this image to the same PC and this time, it was joined to my domain and the computer name was set to CLONEDEPLOY. I used the same .xml this year as I used last year. The only difference that I can think of is that I'm trying to deploy v1803 this year instead of v1703.

  • After you deploy 1803 can you check c:\Windows\Panther\unattend.xml to see if it exists and what is the value of computername if it does exist.

  • I checked C:\Windows\Panther\unattend.xml and the computername is listed correctly. It shows the same name that is listed in CloneDeploy. However, the actual computername is listed as something completely different. It appears to be a random name. If I manually try to rename the PC, it allows me to do it so I don't think there's a conflict in the name when it attempts to change it after it's been deployed. Are there logs files that I can look at to see why the computer was not renamed correctly?

  • As long as CloneDeploy is updating the file, there isn't really anything else that can be done. This appears to be a Sysprep issue with 1803, probably a bug. Here is someone else with same problem, not related to CloneDeploy.

  • Ok. I replied to this post to the TechNet post to see if we can get some answers.

  • I believe I found out why v1803 was not renaming the PC correctly. When I built the reference image for my live environment, I set the name of the PC to what it was going to be called in AD after my reference image was deployed to it. In my test environment though, I left it with whatever random name Windows used when I did the clean install of v1803. Apparently, in v1803, if the computer is configured with the same name as specified in your .xml file, it skips renaming it and applies a random name. If the name of the PC is set to something random, then during OOBE, it will change it to what you have specified in your .xml.

    I verified this works because on the PC in my live environment, I renamed it to something random, ran sysprep, shutdown the PC, uploaded the image, and then deployed the image. After the deployment was finished, the PC was joined to my domain with the correct name. In my test environment, I changed the PC from the random name to the name that was specified in the .xml and after I deployed the test reference image, it was joined to my domain but with a random name. I also verified that if the name of the PC is set to what it was going to be called in AD and the PC is running v1703, it still renames it. This must be a change in v1803.

  • Thanks for the update.

  • This post is deleted!