locked
SCCM OSD and Microsoft Deployment RRS feed

  • Question

  • Hi

     

    I'm looking into what Microsoft Deployment has to offer to SCCM OSD TS. I have successfully tested the "Configure WDS PXE Filter" option to enable deployment of unknown systems. This works very good, however the computer name is based on the MAC address.

     

    I have also looked at the various scripts en task sequences offered by Microsoft Deployment. However I still fail to get a good grasp about this.

     

    Question:  I would like to get prompted for the computer name and use this during installation. Can I do that with the existing scripts in Microsoft Deployment? Anyone done this? I'm also interested in getting prompted for additional information as well and store this, such as who build the computer.

     

    I posted the question in the SCCM forum because I'm not quite getting the full understanding of SCCM 2007 and Microsoft Deployment integration. I'm primarily interested in how to build more advanced OSD TS - probably by using scripts included in Microsoft Deployment, however I'm not interested in implementing the distribution shares or database etc.

     

    How for instance is variables/data gathered by Microsoft Deployment passed on to SCCM OSD TS?

     

    Thanks a lot!

     

    /Ragnar

    Tuesday, January 8, 2008 10:33 PM

Answers

All replies

  • I too would like to know if it's possible to be prompted for a machine name to be used when the PXE Filter creates the computer object.  Our staff here is used to computer names like "PC877".  If they had to start looking for computer names base on the MAC, they may revolt against me!

     

    Wednesday, January 9, 2008 8:54 PM
  • Hi

     

    Could you give us an update? We really want some more details about how to prompt/input computer name during OSD.

     

    /Ragnar

    Sunday, January 13, 2008 1:27 PM
  • Anyone out there?

     

    /Ragnar

     

    Wednesday, January 16, 2008 8:13 PM
  • As I can see that you passed through the part I posted to have answer for it, Please take a time to look at my post and try to answer it

    my post http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=2690047&SiteID=17

     

    Thanks

    Thursday, January 17, 2008 3:30 PM
  • If you know scripting very well you can actually add a task within the task sequencer of the actual build you are wanting to be prompt for within BDD 2007 at the preinstall stage for example at "New computer only" stage you add a new task and at the command line input

     

    csript.exe "%SCRIPTROOT%\RequestComputerName.vbs"

     

    Rename the task to whatever you ilke, probable "Request Computer Name". once you have done this move the task up to the top of the tasks for the New Computer Only section and in this instance will only prompt if the machine is a new computer, you can of cause run the same for computer refresh builds as well but will need to input this into that stage of the task sequence.

     

    I can send some screen shot of these if you like.

     

    But if this isn't what your after let me know.

     

    Thanks,

    Josh

    Tuesday, January 22, 2008 10:39 PM
  • Hi

     

    have you found any interesting documents regarding your issue. ?

     

    Also trying to figure out the connection between MD (bdd) and sccm 

     

    br

    \erik

    Monday, January 28, 2008 4:19 PM
  • Hi

     

    Yes, that's exactly what I need. To be able to allow the desktop technicians to specify computer name during the SCCM OSD deployment.

     

    I'm not that good at VB scripting, but I'm able to create task sequences if you provide me with some details and the actual scripts and variables used.

     

    How does this work with unknown systems? Currently I'm using the PXE hook from Microsoft Deployment. However that code automatically sets the computer name to the same as the MAC address....

     

    Thanks a lot - really looking forward to some details from you! Smile

     

     

    /Ragnar

    Tuesday, February 5, 2008 7:45 AM
  • Hi Ragnar,

     

    The VB script is as follows:

    Option Explicit

    Dim numCount
    Dim strComputerName
    Dim objOSD

    Do While numCount = 0
        strComputerName = InputBox ("Please enter a name for the new computer:","New Computer Name","Vista00",10,10)
        If strComputerName = "" Then
            Wscript.Echo "You must enter a computer name."
        Else
     Set objOSD = CreateObject("OSD.Environment")
     objOSD("OSDNEWMACHINENAME") = strComputerName
     Set objOSD = Nothing
            Exit Do
        End If
    Loop


    The script is copied to your ZTI distribution point scripts folder (and then copied over to the SMS OSD deployment point) and is called by entering a new task into the task suquencer in the NEW COMPUTER folder in the PREINSTALL phase. This task, after creation should then be moved to the top of the list in the NEW COMPUTER folder

    It is also possible to use the BDD 2007 wizard framework to create wizards that prompt for information at build time and use the OSD variables. BDD already supplies a COMPUTERNAME wizard and this could be used instead of the VB script shown above

     

    Let me know if you need anything else.

     

    Cheers,

    Josh

    Wednesday, February 6, 2008 8:55 AM
  • Hi Ragnar,

     

    The VB script is as follows:

    Option Explicit

    Dim numCount
    Dim strComputerName
    Dim objOSD

    Do While numCount = 0
        strComputerName = InputBox ("Please enter a name for the new computer:","New Computer Name","Vista00",10,10)
        If strComputerName = "" Then
            Wscript.Echo "You must enter a computer name."
        Else
     Set objOSD = CreateObject("OSD.Environment")
     objOSD("OSDNEWMACHINENAME") = strComputerName
     Set objOSD = Nothing
            Exit Do
        End If
    Loop

    The script is copied to your ZTI distribution point scripts folder (and then copied over to the SMS OSD deployment point) and is called by entering a new task into the task suquencer in the NEW COMPUTER folder in the PREINSTALL phase. This task, after creation should then be moved to the top of the list in the NEW COMPUTER folder

    It is also possible to use the BDD 2007 wizard framework to create wizards that prompt for information at build time and use the OSD variables. BDD already supplies a COMPUTERNAME wizard and this could be used instead of the VB script shown above

     

    Let me know if you need anything else.

     

    Cheers,

    Josh

    Wednesday, February 6, 2008 9:18 AM
  • Okay, so say we don't feel like going through all the trouble of doing BDD and ZTI. In SCCM how would we get this work in a Task Sequence. I don't see the benefits of BDD in SCCM that warrants all the work having to go into it. Is there a soltion native to use in SCCM, or a way to implement the above without being forced to use ZTI/BDD? Just looking for a simple solution, not a "Okay, now go do all this extra stuff".

     

    Thursday, February 7, 2008 10:41 PM
  • Check out the "pre-execution hook" feature in ConfigMgr 2007.  This hook allows you to run any program you want that will presumably put up some UI and prompt for any values such as the computer.  The program can then set task sequence variables that will be used later when the task sequence runs.  So if your UI set the variable OSDComputerName, it would be used later in the task sequence to set the computer name.

     

    Here's a link to the documentation on this feature:  http://technet.microsoft.com/en-us/library/bb694075.aspx.  The feature is admittedly a little bit clumsy to use, but it works.

     

    Friday, February 8, 2008 1:25 AM
  • Will do, Many thanks Michael

     

    Friday, February 8, 2008 4:25 AM
  • The task sequence withing SCCM works in the same way as the BDD task sequence process works, so in theory (I haven't put this into practice), you should be able to do the same.

     

    BDD, as has been mentioned in other forums a solutions accelerator and some people prefer the use of likes of BDD to manage the OS deployment particularly with SMS 2003.

     

    Cheers,

    Sunday, February 10, 2008 5:09 AM
  • Hi All,

     

    Just an FYI, I was unable to get Josh's code to work as-is. I modified mine to be a wsf and made a few other changes. The code I got to work is as follows:

     

    Code Snippet

    <job id="ZTIPromptForComputerName">
       <script language="VBScript" src="ZTIUtility.vbs"/>
       <script language="VBScript">
    Option Explicit

    Dim numCount
    Dim strComputerName
    Dim objOSD

    Do While numCount = 0
        strComputerName = InputBox ("Please enter a name for the new computer:","New Computer Name","",10,10)
        If strComputerName = "" Then
            Wscript.Echo "You must enter a computer name."
        Else
            oEnvironment.Item("OSDNEWMACHINENAME") = strComputerName
            oEnvironment.Item("OSDCOMPUTERNAME") = strComputerName
            Exit Do
        End If
    Loop
       </script>

    </job>

     

     

    In order to access oEnvironment.Item, you needed to include the file that actually instantiates oEnvironment which is ZTIUtility.vbs. Also, the variable "OSDNEWMACHINENAME" didn't seem to work where "OSDCOMPUTERNAME" did. This might have sometime to do with my machine already being in the SCCM database from numerous runs through the PXE filter. Many thanks to Josh for pointing me in the right direction!

     

     

    Monday, March 17, 2008 4:28 PM
  • Hi,

    does anyone know where to place this script file and how to call it from the TS?

    I'm struggling to get a prompt for the computername.

    Thanks!

    Tuesday, May 27, 2008 2:14 PM
  • have you go MDT 2008 installed?  if not install MDT then open up the task then you can enter the path script in the pre install phase I think?

     

    Jamos J

    Tuesday, August 5, 2008 1:23 PM
  • Hi,

       I've been trying to get this exact thing working on SMS 2003 with OSD for a while now.  However, the script is being executed in the system context, and so the user does'nt get to see any input boxes.  Does anyone know if this is possible ?

    Thanks

    David Frith

     

    Monday, August 25, 2008 6:38 AM
  • for SMS/OSD with BDD/MDT integration, write a user exit script, and call a frontend.. johan wrote a pretty good one http://www.deployvista.com/Blog/JohanArwidmark/tabid/78/EntryID/46/Default.aspx

     

    Michael

    Monday, August 25, 2008 8:04 AM
  • Hi this is how i did it.

     

    Create an image containing a sysprep.inf file. Leave in the sysprep.inf file the machine name empty

     

    Sysprep the machine using shutdown command.

     

    Capture image

     

    Deploy image with SCCM during the deployment process the sequence stops and proposes a random name. Here you change the name of the machine, and click next, the deployment procedure continues.

     

    ain't the nicest way, but it works for me Surprise)

     

    One beer comming my way !

     

    Monday, August 25, 2008 11:11 AM
  •  

    Do you or someone else have some more details on how to use Johan's frontend in SCCM SP1?

    Thanks!

    Tuesday, August 26, 2008 8:36 AM
  • Hi

     

    I put this small guide on how to change pc name during deployment on my blog http://kongkuba1.spaces.live.com/blog/cns!EEFF1607E296E5AB!225.entry 

    The frontend that Johan has written is for the BDD/MDT database, so how it works with  SCCM i don't know, but you could try runing it as a part your TS just to se what happens..

     

    Michael

     

    Tuesday, August 26, 2008 10:43 AM
  •  Michael Petersen (kungkuba1) wrote:

    Hi

     

    I put this small guide on how to change pc name during deployment on my blog http://kongkuba1.spaces.live.com/blog/cns!EEFF1607E296E5AB!225.entry 

    The frontend that Johan has written is for the BDD/MDT database, so how it works with  SCCM i don't know, but you could try runing it as a part your TS just to se what happens..

     

    Michael

     

     

    Hi Michael,

    I was able to get your script working!

    Thanks!

    Sander

    Friday, September 26, 2008 1:00 PM
  • Well it seems like Microsoft has realised a need for this as well and has included the functionality in MDT 2010 as UDI (code name Modena)

    Saturday, August 6, 2011 9:00 PM