none
Retain same machine name in Offline Refresh scenario RRS feed

  • Question

  • I am using customized computer naming for domain computers based upon sequential 5 digit number available in Active Directory.

    I am using sccm and mdt for osd task sequence. Any suggestion or idea how to retain same customized computer name by rebuilding client using offline media?


    Anand Prasad

    Monday, August 29, 2016 5:33 PM

All replies

  • A refresh in MDT defaults to using the existing computer name unless you specify one (by defining OSDComputerName).

    Tuesday, August 30, 2016 1:10 PM
  • Hi,

    I have a customized OSDComputerName assigned to my Windows 10 SOE. I can retain the same machine name in all deployment scenarios except Offline Rebuild scenario.


    Anand Prasad

    Tuesday, August 30, 2016 2:58 PM
  • we're missing details to help you here:

    • how is your custom name assigned ? I assume you use some kind of script in the task sequence ?
    • how do you deploy your task sequence ? known or unknown computers ?

    if you use a custom script to find the name, I would suggest putting a condition on the task that runs it to not run if OSDcomputerName is already set. Which should be the case if you already have an object in SCCM for that computer and if you deployed the Task Sequence to it.


    David Sebban | Nelite North America | My Blog : http://dsebban.wordpress.com | Follow me on twitter : http://twitter.com/davidsebban

    Tuesday, August 30, 2016 5:33 PM
  • Computer Name standard is as follows which I implemented in my environment-

    DEP10001 = DE (Country Code Germany) P (Machine Type = Physical) 10001 (5 digit available sequential number available in Active Directory under Country OU)

    DEV10001 =  DE (Country Code Germany) P (Machine Type = Virtual) 10001 (5 digit available sequential number available in Active Directory under Country OU)

    I have a single task sequence which is used to build machines - ZTI, LTI, HTI and Offline build. Same task sequence is also used for Refresh scenario.

    For unknown computers I have use Customsettings.ini file and for known computers I am using Collection variables to assign OSDComputername and Regional settings.

    Below is my customsettings.ini -

    [Settings]
    Priority=RandomGUID, ByLaptopType, ByDesktopType, ByVMType, DefaultGateway, Default
    Properties= RandomNo,CountryCode,NameByType, MyCustomProperty 

    [RandomGUID]
    RandomNo=#Mid(oStrings.GenerateRandomGUID,2,5)#

    [ByLaptopType]
    Subsection=Laptop-%IsLaptop%

    [ByDesktopType]
    Subsection=Desktop-%IsDesktop%

    [ByVmType]
    Subsection=VM-%IsVM%

    [Laptop-True]
    NameByType=P

    [Desktop-True]
    NameByType=P

    [VM-True]
    NameByType=V

    [DefaultGateway]
    10.204.160.1=Germany

    [Germany]
    CountryCode=DE
    UILanguage=en-US
    UserLocale=de-DE
    SystemLocale=de-DE
    InputLocale=0407:00000407
    TimeZoneName=W. Europe Standard Time
    OSDComputerName=%CountryCode%%NameByType%%RandomNo%


    [Default]
    OSInstall=Y
    ApplyGPOPack=NO
    HideShell=YES
    SkipAdminPassword=Yes
    SkipApplications=Yes
    SkipAppsOnUpgrade=YES
    SkipBDDWelcome=YES
    SkipBitLocker=YES
    SkipBuild=NO
    SkipCapture=Yes
    SkipComputerBackup=YES
    SkipComputerName=YES
    SkipDeploymentType=YES
    SkipTaskSequence=YES
    SkipDomainMembership=YES
    SkipPackageDisplay=YES
    SkipOSRoles=YES
    SkipOSFeatures=YES
    SkipLocaleSelection=YES
    SkipProductKey=YES
    SkipRoles=YES
    SkipSummary=YES
    SkipTimeZone=YES
    SkipUserData=YES

    unknown computers gets built with a temporary 5 digit sequemtial number for example - DEP569KD using below OSDComputerName variable

    OSDComputerName=%CountryCode%%NameByType%%RandomNo%

    At the end of task sequence I have a powershell script which goes to the AD, finds 5 digit available sequential number and rename the computer. Here in this case it will rename computer from DEP569KD to DEP10001.

    To add a condition in task sequence so that the powershell script doesn't run in case of refresh scenario, I have added a collection variable in All Unknown Computers. This collection variable when evaluates to true which means machine is not known to SCCM this script runs and when it evaluates to false this script doesn't run.

    Now problem which I faced while building machine using offline media, powershell script didn't ran because every time collection variable evaluates to false as it is Offline build and script doesn't. Now to make new offline install work I made the powershell script to run everytime. 

    I need some kind of TS condition which can identify if machine is a refresh build using offline media so that same machine name can be assigned to the refresh machine which is not happening as of now.

    Any help or suggestions will really help me.


    Anand Prasad


    • Edited by anandprasad89 Tuesday, September 13, 2016 6:24 PM corrected typo
    Wednesday, August 31, 2016 11:33 AM