I have successfully captured an Image with the K2000. My question is, I need to restore this image to several machines and would like to automate the computer rename task. 

I have tried using the get/set computer name tasks for both preinstall and mid-level tasks, both failed. I tried using just Set computer name and it didn't work either.

I am looking into wsname as a post install task, but not exactly sure how to go about it.  http://www.kace.com/support/resources/kb/article/how-to-rename-a-computer-and-join-it-to-a-windows-domain-image-deployment

I would like to have it prompt for a name and enter it in. Or, LABXX where (XX) would auto-generate a number consecutively and retain (LAB). I do not need to join a domain as this is for a workgroup environment. 

Windows 7 x86.  

1 Comment   [ + ] Show Comment

Comments

  • This is one of the main reasons (aside from disk space) that I got away from imaging in the traditional sense and moved more towards scripted installations. With our scripted install, I am prompted to enter the computer name right after the disk is formatted.
Please log in to comment

Answers

0

Is your image sysprepped?  Get/Set ComputerName requires the image be sysprepped.

Also, both have a /debug switch that you can add to the commandline to troubleshoot.

Corey
Lead L3 Enterprise Solutions Consultant, K2000
If my response was helpful, please rate it!

 

Answered 09/25/2013 by: cserrins
Red Belt

  • I failed to put that in my post, they are not sysprepped.
    • Collect/Apply and Get/Set both require that your image be sysprepped.
      To do it the way you want you will need to use wsname. However, I strongly encourage you to only use sysprepped images when deploying the same image to multiple machines.

      Corey
      Lead L3 Enterprise Solutions Consultant, K2000
      If my response was helpful, please rate it!
  • This content is currently hidden from public view.
    Reason: Removed by member request
    For more information, visit our FAQ's.
  • You need to sysprep win 7 machines if they are in the same domain or else you will have duplicate SIDS and this results in many down the road problems.
    • So I sysprepped them and got everything working correctly. However, I have a question... Is there a way to change the workgroup name other than workgroup? If not, it's not a big deal. I have a particular lab that we have a separate workgroup name.

      I have sysprepped WIN7 machines before, but was looking into wsname utility as I couldn't figure out a way to change the workgroup name in the unattend xml file.

      Here's what I have:

      Prompt for input of computer name and then change the workgroup name.

      <ComputerName>%Please input a computer name(0,15)%</ComputerName>
      </component>
      <component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <Identification>
      <Credentials>
      <Domain>localhost</Domain>


      </Credentials>
      <JoinDomain>localhost</JoinDomain>
      <JoinWorkgroup>Physics</JoinWorkgroup>
      </Identification>
      </component>
      • You can put the group name to whatever you want under JoinWorkgroup in the answer file

        <component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <Identification>
        <JoinWorkgroup>tmccacad.tmcc.e</JoinWorkgroup>
        </Identification>
        </component>

        you can also run this in your postinstall script to change the workgroup from the generic one in the answer file you use to something else.

        Wmic computersystem where name="%computername%" call joindomainorworkgroup name="new_group"

        you will need to reboot for the group to take effect
Please log in to comment
0

Here's something I wrote up on this site that may assist you:

http://www.itninja.com/blog/view/vbscript-move-computer-to-desired-ou-rename-to-naming-standard-and-reboot-shutdown

You could enter "Name=LAB" and it would give you something like "LAB-PC-#######" where the #'s are the serial number of the computer.

I wrote it for a domain environment, but if you do not use the "OU=" command it should just rename the computer for you.

I haven't tested it in a workgroup environment, but am curious to see if it works.

Otherwise, this is a link to the rename script I found online that I incorporated into my script:

http://www.activexperts.com/activmonitor/windowsmanagement/scripts/activedirectory/computer/#RenameAComputerAnd.htm

And here's one to get the serial number:

http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/computermanagement/hardware/#RetrBiosInfo.htm

Combine the two and you should be good.

Veritas Amor Pax

Answered 09/25/2013 by: crispybiscuit
Orange Belt

Please log in to comment
Answer this question or Comment on this question for clarity