Close Menu
    Facebook X (Twitter) Instagram
    Sunday, October 12
    X (Twitter) LinkedIn Reddit RSS
    All about Endpoint Management
    • Home
    All about Endpoint Management
    Home»OS Deployment»MDT SCCM Prompt for New Computer name deploying Image

    MDT SCCM Prompt for New Computer name deploying Image

    Eswar KonetiBy Eswar KonetiDecember 17, 4:33 am2 Mins Read OS Deployment 3,475 Views
    Share
    Facebook Twitter LinkedIn Reddit

    Thre are many methods which you can achive this task but i like this way in doing  for prompting the computer name in MDT SCCM when deploying an image would be using the below simple VB script.It deals with known and unknown computers.

    set env = CreateObject("Microsoft.SMS.TSEnvironment")

    'Set the OSDComputerName variable to the detected name assuming this is a known computer

    env("OSDComputerName") = env("_SMSTSMachineName")

    'If the detected name contains "MININT" then this is an unknown computer so ask for a name

    If InStr(1,env("OSDComputerName"),"MININT",1) then

        Name = inputbox("Rename Computer" ,"Please enter the new Computer name below:",env("OSDComputerName"),400,0)

        env("OSDComputerName") = Name
        env("ComputerName") = Name
        env("HostName") = Name

    End If

    Copy the script and paste in note pad and save it as .vbs.Add this script to your MDT tool kit package in scripts folder(if you have integrated MDT with SCCM else create a package for this script and a program with command line as cscript VBscript.vbs which have not tried).

    Update the DP and make sure,the script should be avilable in  in the DP share.

    Now create a new Task  after 'Use Toolkit Package' step in the 'Initialization' phase (group) in your TS with the command line(in mycase it is cscript.exe %deployroot%\scripts\Prompt-CN.vbs).

    Below are the simple tasks which can be used to deploy OS:

    1. Restart in Windows PE
    2. Partition disk
    3. Use Toolkit Package
    4. Set OSDComputerName
    5. Apply Operating System 
    8. Apply Windows Settings
    9. Apply Network Settings
    10. Setup and configure

    Below is the sample Task Sequence which you can downlad it from here Win7_X86_Computer Prompt .edit the Task sequence to change the boot image ,Wim Image and other packages as well.

    Thanks to Mark for original script.

    You can also do this by creating a collection variable called OSDCOmputername to the computer collection and advertise the Task sequence to the collection. More Via Technet and Via windows-noob

    Get computer Prompt MDT 2007 NDT 2010 New COmputer name OSD computername Prompt Computer name while deplying OS SCCM 2007 NEw computer Set computer name
    Share. Twitter LinkedIn Email Facebook Reddit

    Related Posts

    SCCM report list collections with no deployments

    December 05, 12:04 pm

    Tool for managing the import and export of SSRS report – ReportSync Tool

    October 27, 9:10 pm

    Troubleshooting Client that has NO SCCM Agent in Console BUT still receive deployments

    August 31, 4:17 pm

    3 Comments

    1. unkown231 on March 30, 2023 7:27 AM

      please share powershel script to take computer name based country + suffix Desktop (D), Laptop (L) Virtual VM suffix + 5 digit last serial number

      Reply
    2. Pierre on January 6, 2011 4:31 PM

      Hi what happened to the sample task sequence?

      Reply
      • admin on January 6, 2011 5:27 PM

        Uploaded it again.Should be able to download it now.Thanks for pointing out.

        Reply

    Leave a ReplyCancel reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Sign Up

    Get email notifications for new posts.

    Author

    I’m Eswar Koneti ,a tech enthusiast, security advocate, and your guide to Microsoft Intune and Modern Device Management. My goal? To turn complex tech into actionable insights for a streamlined management experience. Let’s navigate this journey together!

    Support

    Awards

    Archives

    © Copyright 2009-2025 Eswar Koneti, All rights reserved.

    Type above and press Enter to search. Press Esc to cancel.