none
MDT 2012 and ComputerNames

    Question

  • Hi, colleagues.

    I have a problem with.... not sure were it is, but I have the following:

    1. My CustomSettings.ini file

    [Settings] Priority=Default Properties=MyCustomProperty [Default] OSInstall=Y SkipCapture=YES SkipAdminPassword=YES SkipProductKey=YES SkipComputerBackup=YES SkipBitLocker=YES JoinDomain=mydomain.local DomainAdmin=svc_mdt DomainAdminDomain=mydomain.local DomainAdminPassword=P@$$w0rd! TimeZone=145 TimeZoneName=Russian Standard Time UserExit=cleanMAC.vbs ComputerName=ws-#CleanMac("%macaddress%")#

    2. UserExit script is simple, and made for cleaning MAC adress (by default 00:00:00:..., after 000000...)

    3. But after succsefull install, I have a different ComputerName with uknown MAC. Same log, n-strings later:

    I know what HostName and Computer name is different properties, but after installation I see my machine name is equal to value setuped in HostName.

    Where I was wrong?

    Wednesday, August 14, 2013 1:13 PM

All replies

  • Sorry for terrible markup, this my first post here.

    Wednesday, August 14, 2013 1:15 PM
  • Try changing:

    ComputerName=ws-#CleanMac("%macaddress%")#

    to

    OSDComputerName=ws-#CleanMac("%macaddress%")#


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”

    Wednesday, August 14, 2013 2:59 PM
  • Thanks for your answer!

    It does not help(

    Now trying with all this properties together:

    UserExit=cleanMAC.vbs
    OSDNEWMACHINENAME=ws-#CleanMac("%macaddress%")#
    HostName=ws-#CleanMac("%macaddress%")#
    ComputerName=ws-#CleanMac("%macaddress%")#

    Thursday, August 15, 2013 6:39 AM
  • Still the same.

    Thursday, August 15, 2013 7:00 AM
  • OSDCOMPUTERNAME is the property to declare the new machine name, so your customsettings.ini file should look like this:

    UserExit=cleanMAC.vbs
    OSDCOMPUTERNAME =#cleanMac("%MACADDRESS%")#

    Your cleanMAC.vbs should look like this:

    Function UserExit(sType, sWhen, sDetail, bSkip)
       UserExit = Success
    End Function
    
    Function cleanMac (sMac)
    
    Dim re
    
    Set re = new RegExp
    re.IgnoreCase = true
    re.Global = true
    re.Pattern = ":"
    cleanMac = "WS-" & re.Replace(sMac, "")
    End Function

    Credit goes to Johan for the above script.

    P.S. A quick way to get the MAC address is to type getmac at the command prompt.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”



    • Edited by Frank Trout Thursday, August 15, 2013 11:49 AM addition
    • Proposed as answer by Frank Trout Monday, September 30, 2013 11:48 AM
    Thursday, August 15, 2013 11:35 AM
  • Does this hardware have a Wireless adapter by any chance that may have the MAC you are seeing get used?

    David Coulter | http://DCtheGeek.blogspot.com | @DCtheGeek

    Thursday, August 15, 2013 3:20 PM
  • Still the same result.
    Monday, August 19, 2013 7:04 AM
  • Hi, DCtheGeek.

    The full story is:

    Reference image was installed on HV VM and updated, then syspreped and captured by imagex, then imorted to MDT.

    *B409 is MAC addres of VM, there image was prepared.

    As far as I can see, it is still in, even after sysprep, and MDT does not/cannot rename it. 

    Monday, August 19, 2013 7:08 AM
  • I think the problem is that CustomSettings.ini by default is only referenced once, just prior to the Deployment Wizard is run, after that it is not referenced to pick up the name generated by the script.

    Try this:

    Edit the task sequnce, and find any Gather local only task steps (there should be three of them)
    On the Proprties page, change the option to Gather local data and process rules then enter CustomSettings.ini in the input box.

    If you do this for all Gather local only task steps, CS.ini is re-evaluated every time this step is run, picking up the changed OSDComputerName...

    Regards,
    Martin.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.


    Monday, August 19, 2013 1:11 PM
  • Martin van Bellen, thank you for answer.

    I've made that changes, but this doesnot help. May be there is some issues on Sysprep stage?

    Here is my BDD.log after last deployment with all settings mentioned in this topic.

    http://sdrv.ms/18H0VbD

    Tuesday, August 20, 2013 7:22 AM
  • From what I can see after analysing your log, the OSDComputerName does get applied correctly; it does correspond with the MAC address.

    However, I did see a strange thing: the C-drive is designated as "too small" (Partition too small Disk0part1 OK TO Skip! 499 Wizard 20-08-2013 09:03:01 0 (0x0000)), so it gets deployed to de D-drive. Maybe you end up with dual boot and you boot into C:, which is the previous deployment?

    Please look into that. I suggest you set up the task sequence to create (and format) only one large partition on the entire drive and use that to deploy the OS.

    Also add this statement to the CustomSettings.ini:
    DoNotCreateExtraPartition=YES


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Tuesday, August 20, 2013 8:26 AM
  • However, I did see a strange thing: the C-drive is designated as "too small" (Partition too small Disk0part1 OK TO Skip! 499 Wizard 20-08-2013 09:03:01 0 (0x0000)), so it gets deployed to de D-drive. Maybe you end up with dual boot and you boot into C:, which is the previous deployment?


    Thank you for your attentiveness, I've missed that. But MDT asks before deployment what to do with previous attempt. If I decided to start a new one, does it mean what MDT diskart all information, and start deployment from scratch?
    Tuesday, August 20, 2013 8:45 AM
  • Yes, it does.

    Provided you set DeploymentType = NEWCOMPUTER in CustomSettings.ini, the disk is repartitioned and reformatted.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Tuesday, August 20, 2013 8:47 AM
  • Partition issues was fixed, but there is same result.

    Tuesday, August 20, 2013 11:07 AM
  • Silly question, but since it appears to be holding on to the MAC address of the reference machine, can you confirm that the machine was Generalized prior to being captured?  I've only seen a machine hold it's name if it was NOT generalized with Sysprep (or something failed during Sysprep and it got captured anyway).

    David Coulter | http://DCtheGeek.blogspot.com | @DCtheGeek

    • Proposed as answer by Frank Trout Monday, September 30, 2013 11:49 AM
    Wednesday, August 21, 2013 2:53 PM