/build/static/layout/Breadcrumb_cap_w.png

K2000 Post Install Computer Name Task

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
  • 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. - dwilliams1307 11 years ago

Answers (2)

Posted by: cserrins 11 years ago
Red Belt
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!

 


Comments:
  • I failed to put that in my post, they are not sysprepped. - akilpatrick 11 years ago
    • 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! - cserrins 11 years ago
  • 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. - SMal.tmcc 11 years ago
    • 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> - akilpatrick 11 years ago
      • 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 - SMal.tmcc 11 years ago
Posted by: crispybiscuit 11 years ago
Orange Belt
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

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ