none
Using MDT to Install Multiple OS's in a Single Task Sequence Using WMI Query to Install WIM Based on Hardware Type RRS feed

  • Question

  • Hi there,

    This is the scenario:

    Decommissioned systems are DoD wiped and then we place a factory image back on the hardware.

    To help streamline the process, I was asked to make it run through MDT. The DoD wipe is done separately, then we PXE boot into WinPE using WDS.

    In MDT the customsettings.ini is set up to automatically choose the correct Task Sequence. Inside that Task Sequence I have 9 "Groups". Each group has a Format and Partition and then Install OS with it pointing to the relevant WIM based on hardware model.(all Lenovo) ie: M50, M52, M55, M7 etc.

    Each Group has an If Statement: If all conditions are true. then under that a

    WMI Query: Select * From Win32_ComputerSystem Where model like "%xxxx%"

    x=model number.

    So when the task sequence runs, it only ever installs the first OS(WIM) on any model. It doesn't seem to be running the WMI Query. The machines never get the correct OS, except the ones that areof that first model. If disable that steps, it just does the same thing with the next OS in the TS, installing that OS on all hardware models.

    What it needs to do is: After booting into WinPE choose the correct WIM based on hardware model, install that OS while using multicasting and having multiple hardware models connected, so we can deploy the correct OS onto say 2 M52's an M55 and 3 M57's all using multicasting and getting done at roughly the same time. This all needs to be automated with very little interaction from the technician.

    Interestingly this method somewhat works when using a Run Command Line and running Imagex. The WMI Query works, picks the right WIM and installs it. However, if you have multiple machines connected of varying model types, imagex appears to queue them up. If you connect all the same model types, imagex appears to have no problem doing them all at once. But because there is no visible progress bar for imagex WinPE just displays "Running Command Line" and it doesn't really fill, it's been requested I have it work the way I specified above without using imagex.

    Is it possible to do this? I can't find anything about this here. Although I didn't search the whole forum and I'm not sure what word combination google would like to get a result relevant to what I am looking for.

    Any help would be appreciated.

    Thanks

    Dan

    Tuesday, May 17, 2011 9:57 PM

Answers

  • Yes, you could add rules to CustomSettings.ini that set the "TaskSequenceID" variable (and probably SkipTaskSequence=YES) based on a model, e.g.:

    [Settings]
    Priority=Model

    [Latitude D600]
    TaskSequenceID=BLAH1
    SkipTaskSequence=YES

    [Latitude E6500]
    TaskSequenceID=BLAH2
    SkipTaskSequence=YES

    etc.

    -Michael Niehaus
     Senior Software Development Engineer
     mniehaus@microsoft.com
     http://blogs.technet.com/mniehaus

     

    • Marked as answer by dantric Wednesday, May 18, 2011 4:46 PM
    Wednesday, May 18, 2011 1:21 PM

All replies

  • Not supported and should not be done. each platform should use it's own TS.
    -- Get it: http://www.truesec.com/deploymentcd http://www.amazon.com/Deployment-Fundamentals-Vol-Migrating-Windows/dp/1451570031/ref=sr_1_1?ie=UTF8&qid=1301091117&sr=8-1 And get out of the deployment swamp
    Tuesday, May 17, 2011 10:30 PM
  • The reason it always installs the same image:  There is a global variable named OSGUID that points to the OS that should get installed.  So you can get this to work, with some limitations, if you change the OSGUID to correspond to the image that you want to install.  Read http://blogs.technet.com/b/deploymentguys/archive/2009/07/13/windows-xp-professional-and-tablet-pc-edition-deployment-with-a-single-wim.aspx for an example of how to do this (ignore the XP part).

    This will be problematic though if the different OSes need different answer files.  If they can all run with the same unattend.xml (e.g. all Windows 7 x86 OSes) then it would work OK.

    -Michael Niehaus
     Senior Software Development Engineer
     mniehaus@microsoft.com
     http://blogs.technet.com/mniehaus

     


    Wednesday, May 18, 2011 1:41 AM
  • As I suspected, it shouldn't really be done. @Shrek46

    Thanks Mike, I read over that, and it sounds like I would have to change the OSGUID for each hardware platform, each time a system is ready to have the factory restore deployed. Since they have the systems connected to a switch and kvm...they are trying to do roughly 16 systems at a time, I don't think changing the OSGUID is going to be a feasible plan.

     

    I was thinking about another way of doing it. If i create 9 task sequences, each corresponding to a hardware model, is there a way to WMI Query and based on the results of that, MDT can choose the correct Task Sequence to run?

    Wednesday, May 18, 2011 1:13 PM
  • Yes, you could add rules to CustomSettings.ini that set the "TaskSequenceID" variable (and probably SkipTaskSequence=YES) based on a model, e.g.:

    [Settings]
    Priority=Model

    [Latitude D600]
    TaskSequenceID=BLAH1
    SkipTaskSequence=YES

    [Latitude E6500]
    TaskSequenceID=BLAH2
    SkipTaskSequence=YES

    etc.

    -Michael Niehaus
     Senior Software Development Engineer
     mniehaus@microsoft.com
     http://blogs.technet.com/mniehaus

     

    • Marked as answer by dantric Wednesday, May 18, 2011 4:46 PM
    Wednesday, May 18, 2011 1:21 PM
  • Excellent! I'll give that a try.
    Wednesday, May 18, 2011 1:37 PM
  • That worked perfectly. One more quick question, can i use ["%7484%"] as a wildcard in customsettings, there are a few model variations and i'd rather not have to create 2-9 entries based on slight variations.
    Wednesday, May 18, 2011 3:15 PM