MDT 2012: Targeting Lite-Touch Deployments

There are a number of Operating System Deployment scenarios where you will need to automate specific configurations to individual or certain types of computers. The most common scenarios are:

There a number of ways in which to tackle this. One method is to configure the Deployment Database. This involves installing and configuring Microsoft SQL Server or Express but I will cover that topic another day. Another method is to use the Priority reserved property in the customsettings.ini file.

There are a number of ways to target a specific machine. They all evolve around collecting data that is unique to a single or type of computer. For example, each PC or server in your enterprise will have their own Serial Number and UUID. Each network adapter will have its own MAC Address. In some cases you may have configured an Asset Tag in the BIOS. All of this information is available in WMI. You can determine the various computer types, like a particular Manufacturer or Model. You can also determine if the machine is a Server, Laptop, Desktop or Virtual Machine.

This information is useful a you may find that you need to deploy a particular application or configuration only to a very specific type of computer in your environment.

In this example, computers are targeted by their UUID. They share a common Organisation name and Workgroup. The first custom Computer is forced into using the WIN7PRO task sequence and has a mandatory application installed. The second Computer  uses the WIN7ENT  task sequence and has two mandatory applications installed.

[Settings] Priority=UUID, Default
Properties=CustomProperty

[Default]
OSInstall=Y

_SMSTSORGNAME=Scriptimus Ex Machina
JoinWorkgroup=Collective

[6E564D56-15A1-32BD-6049-E5F61008C5A1]
  SkipTaskSequence=YES

   TaskSequenceID=WIN7PRO
   Applications001={0b41ce2c-03a2-49c6-a129-2f6f9e5925ea}

[8F094D56-E366-C6E1-B89B-0FE330393A56]
  SkipTaskSequence=YES
   TaskSequenceID=WIN7ENT

   Applications001={0b41ce2c-03a2-49c6-a129-2f6f9e5925ea}
Applications002={a6e63ac1-0498-406e-8a7c-17876f0a7d49}

The customsettings.ini samples below will demonstrate some other methods and will configure a Computer Name based on a specific criteria.

Automating a Deployment to a Specific Computer


[Settings]
Priority=MACAddress, Default
Properties=CustomProperty

[Default]
OSInstall=Y

[00:37:62:F2:E5:A7]
  OSDComputername=PC01

[09:7A:36:82:98:B4]
  OSDComputername=PC02

Or


[Settings]
Priority=SerialNumber, Default
Properties=CustomProperty

[Default]
OSInstall=Y

[056987]
  OSDComputername=PC01

[053586]
  OSDComputername=PC02

Or


[Settings]
Priority=UUID, Default
Properties=CustomProperty

[Default]
OSInstall=Y

[6E564D56-15A1-32BD-6049-E5F61008C5A1]
  OSDComputername=PC01

[8F094D56-E366-C6E1-B89B-0FE330393A56]
  OSDComputername=PC02

Automating a Deployment to a Specific Make


[Settings]
Priority=MAKE, Default
Properties=CustomProperty

[Default]
OSInstall=Y

[VMWare]
  OSDComputername=VM01

[Dell Inc]
  OSDComputername=PC01

Automating a Deployment to a Specific Model


[Settings]
Priority=Model, Default
Properties=CustomProperty

[Default]
OSInstall=Y

[Latitude D610]
  OSDComputername=PC%SerialNumber%

[HP ProBook 6560b]
  OSDComputername=PC01

Automating a Deployment to a Specific Location


[Settings]
Priority=DefaultGateway, Default
Properties=CustomProperty

[Default]
OSInstall=Y

[DefaultGateway]
  10.0.0.1=Manchester
  172.16.1.1=Birmingham
  172.16.2.1=Birmingham
  172.16.3.1=Birmingham
  10.10.1.1=London
  10.10.2.1=London

[Manchester]
  OSDComputername=MAN%SerialNumber%

[Birmingham]
  OSDComputername=BIR%SerialNumber%

[London]
  OSDComputername=LON%SerialNumber%

Automating a Deployment to a Specific Chassis Type


[Settings]

Priority=...,ByLaptopType,ByDesktopType,ByServerType

[ByLaptopType]

Subsection=Laptop-%IsLaptop%

[ByDesktopType]

Subsection=Desktop-%IsDesktop%

[ByServerType]

Subsection=Server-%IsServer%

[Laptop-True]
  OSDComputername=LAP%SerialNumber%
  Applications001={0b41ce2c-03a2-49c6-a129-2f6f9e5925ea}

[Laptop-False]

[Desktop-True]
  OSDComputername=PC%SerialNumber%

[Desktop-False]

[Server-True]
  OSDComputername=SRV%SerialNumber%

[Server-False]

You can create your own custom deployments based on property information collected in the gather logs.

Advertisements

About Andrew Barnes

A Scripting and Deployment Specialist.
This entry was posted in Deployment, MDT 2010, MDT 2012 and tagged , , , , , , . Bookmark the permalink.

16 Responses to MDT 2012: Targeting Lite-Touch Deployments

  1. Alexandr says:

    it is possible to use only 8 last characters from serial number in OSDcomputername?

    Like

  2. MD says:

    Really..This is a helpful Blog.

    Thanks..!!!

    Like

  3. Stephen says:

    I have a couple of different sections I have defined for naming a machine but for the life of me it keeps defaulting back to the last resort name and I was just wondering if you might be able to look at a config and see if you see anything wrong with it?

    Like

  4. Julian C says:

    Is possible use the chassis type by name in OSDcomputername?

    Like

  5. Andrew says:

    Great article as usual!
    – Do you have a link/script that has all the properties you can use in the Rules tab?
    – Do you have a script that can tell me all these properties on a particular machine (run from WinPE?)

    Thanks!

    Like

  6. Zak says:

    Would something like this work for chasis type:

    [Settings]
    Priority=ByDesktopType, ByLaptopType, ByVirtualType, Default
    Properties=MyCustomProperty, ComputerName, ComputerLocationName

    [ByDesktopType]
    Subsection=Desktop-%IsDesktop%
    ComputerName=D%Assettag%

    [ByLaptopType]
    Subsection=Laptop-%IsLaptop%
    ComputerName=L%Assettag%

    [ByVirtualType]
    Subsection=Virtual-%IsVM%
    ComputerName=v%VDI%

    And could you have a combination with say location to give a more specific name?

    Like

  7. james says:

    Hey, do you know anything about targeting CustomSettings by using TaskSequenceID? I’ve searched the typical forums and it seems like this may be a bug in MDT2012? I would think you could do something like Priority=TaskSequenceID, Default and then have a section like [MyTaskSequence] where you could set some variables specific to that task sequence.

    But in my experimentation, trying to change the _SMSTSORGNAME variable, this is not working. Forums seem to indicate this could be a bug with DeployWiz_Validation.vbs. It seems this is empty on 2012. Apparently this use to work just fine in 2010.

    Anyway, I was just wondering if you knew anything about this.

    Thanks.

    Like

  8. Richard W says:

    Hi Andrew,

    I have all of my computers in my customsettings.ini, to be filtered by the MAC.
    I have Vista and Windows 7 machines in my environment and WIM for each OS.

    This is a sample of what I have currently. Should I have the Task Sequence for each separate computer like this or do it a different way? I am very happy to have found your blog, you are a very wise and helping man!

    [00:00:00:00:00:00]
    OSDComputername=U-0001
    ProductKey=AAAAA-AAAAA-AAAAA-AAAAA-AAAAA
    TaskSequenceID=WIN7PRO

    [AA:AA:AA:AA:AA:AA]
    OSDComputername=U-0002
    ProductKey=BBBBB-BBBBB-BBBBB-BBBBB-BBBBB
    TaskSequenceID=WINVISTABUS

    Thanks,

    Richard

    Like

    • Hi Richard,

      You should not have all your computers in the customsettings.ini, this example is just for 5 – 10 machines tops.

      Anything above that, you should use the deployment database. It sounds hardcore but it’s actually much easier than the customsettings.ini once you get started.

      /Andrew

      Like

  9. Richard W says:

    Hi Andrew,

    I will look into getting SQL Express setup on the Server then and move all the computer settings into that. I have most of the steps already saved so with my excel file it should be a breeze.

    Thanks for the reply!

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s