13 Replies Latest reply on Sep 6, 2013 12:52 AM by RobLent

    Computer Naming During Provisioning

    RobLent Specialist

      Well finally got my imaging working with the assistance of people on this forum.

       

      Now I have another issue.

       

      We will be using LDMS to upgrade our estate from XP to Windows 7.  We will need to keep the PC name during this process.

       

      So in my testing I have imaged a PC, named it and joined it to our domain.

       

      LDMS shows the correct name i the console and in the database.

       

      To test out my template I have run a job against this PC and during CTOS ticked the box that states it will use the name in hte database if it exists.

       

      However when it builds teh PC it STILL gives it a random name!  Why is this?

       

      Have I missed a step somewhere?

       

      Any help appreciated.

       

      Rob

        • 1. Re: Computer Naming During Provisioning
          riccafer Apprentice

          To configure computer during provisioning you should run sysprep.exe and creates an unattend.xml response file where you can specify a variable with the new computer name (i.e you can use Database Value  "Computer"."DeviceName").

           

          Did you ran sysprep before capture the image?

          • 2. Re: Computer Naming During Provisioning
            Apprentice

            In your sysprep file you should add the database variable for the hostname. It will read the value from the database and put it into sysprep. If this is blank or left out of sysprep you will get a random computer name that usually starts with the registered owners name.

             

            <computername>%ldHostname%</computername>

            • 3. Re: Computer Naming During Provisioning
              RobLent Specialist

              Thanks for the replies.

               

              Yes.  This is a sysprepped image and the Unattend.xml file does have the %ldhostname%  entry in it.  (I have just double checked it to be sure!)

               

              However CTOS in LanDesk run AFTER the image is applied and therefore the unattend.xml file has been processed surely?

               

              Also if this needs to be in unattend then why does CTOS have the option also?

               

              Getting a little confused here.

               

              Rob

              • 4. Re: Computer Naming During Provisioning
                riccafer Apprentice

                Check log file C:\Windows\Panther\Setuperr.log

                • 5. Re: Computer Naming During Provisioning
                  Apprentice

                  CTOS is for the machines GUID in LANDesk so that it keeps the same record.

                   

                  Before CTOS but after the OS image you should have a step for injecting the sysprep script this script should be setup with the variables to pull the system name from the database and inject it during this instance. Also be sure to use the correct case for the sysprep script I think the default is %ldHostname% with the capital H

                   

                  Take the CTOS step out of your provisioining template, after your image applies open your unattend file usualy c:\windows\system32\sysprep and check what your computer name is going to be.

                  • 6. Re: Computer Naming During Provisioning
                    RobLent Specialist

                    wow.  Ok.  thanks guys.

                     

                    I will check all these out and get back to you.

                     

                    really appreciate the help.

                     

                    Cheers,

                     

                    Rob

                    • 7. Re: Computer Naming During Provisioning
                      bnelson Employee

                      Rob,

                       

                      Are you importing your unattend.xml into LANDesk and then using inject script to plant it on the imaged device? If you are not, then ensure you are doing that.

                      • 8. Re: Computer Naming During Provisioning
                        RobLent Specialist

                        Hi bnelson.

                         

                        Sorry for the delay but I have been out of the office for a week.

                         

                        Yes I am using the inhect script within LANDesk for my unattend.xml

                         

                        Will get on to testing this now I am back.

                         

                        Rob

                        • 9. Re: Computer Naming During Provisioning
                          RobLent Specialist

                          Ok.

                           

                          So checked the unattend.xml file following an image and found that the %ldHostname% had changed to NewWin7PC.

                           

                          Now I am unsure where that name came from so I took a look at the database and found under the table PROV_VARIABLE_DEF two keys named ldHostname.

                           

                          The first one has a value of "Computer"."Device Name" - This is what I would expect and is obviously the default entry.

                           

                          The second one has a value of NewWin7PC - Ah ha.  So this is where that name came from in the unattend.xml.

                           

                          But where did this second key come from?  And how do I remove it?

                           

                          Any thoughts on how to remove that second key?

                           

                          Rob

                          • 10. Re: Computer Naming During Provisioning
                            RobLent Specialist

                            Well I just cannot seem to get this working.  I have tried all different options including removing the CTOS stage to test with but the deployment still give the computer a random name when it re-builds it.

                             

                            The unattend.xml file has the replaced value of NewWin7PC in it but even this is not applied to the computer.  The %ldHostname% variable does not seem to achieve what it says it will by using the current name in the database.

                             

                            This is going to be a show stopper for us if I cannot figure it out as we are going to be doing over 800 PC's that need to keep the same name.

                             

                            Looks like I will need to raise a support call to figure this one out.

                             

                            Rob

                            • 11. Re: Computer Naming During Provisioning
                              Apprentice

                              Yeah you might be best letting support look over your shoulder if you have a support contract. A few things to verify is that when you imported the xml file make sure NOT to select the "insert variables into script" also before you reimage the machine made sure the computer record has something in the database for Computer.Device Name. You could go one more step and try right click on the device you are about to deploy to and manage variables. Configure a static test name by entering %ldHostname% as the name select string type and type the test computer name, add it to device varriables and then test the OSD.

                              • 12. Re: Computer Naming During Provisioning
                                Tom Farrugia SupportEmployee

                                Remember too that variables are CaSe SeNsItIvE!

                                • 13. Re: Computer Naming During Provisioning
                                  RobLent Specialist

                                  They are Tom.  And I have double checked that and I do seem to have them right.

                                   

                                  I think there is an issue somewhere with my susprep process as now the PC name is poulated to the unattend.xml but is not getting applied to the computer.

                                   

                                  More research required!

                                   

                                  Thanks for all the help here folks.

                                   

                                  Rob.