The Deployment Guys

Helping to deploy your world automagically...

Controlling Package Sequence with Multiple Roles in MDT 2008

Controlling Package Sequence with Multiple Roles in MDT 2008

  • Comments 10
  • Likes

The Microsoft Deployment Toolkit allows you to assign a “sequence” to package/programs within a role. However, what if you have 3 different Computer Roles and want to preserve an order within them? For instance say you have the following computer based roles assigned to the same computer: Everyone, HR, Finance like such:

clip_image002

and want to order the installed packages in this order: First install packages for Everyone, then the packages for HR and finally the packages for Finance like this:

Order

Package

Sequence in Role

Role

001 Program 1 1 Everyone
002 Program 2 2 Everyone
003 Program 3 3 Everyone
004 Program 4 1 HR
005 Program 5 2 HR
006 Program 6 3 HR
007 Program 7 1 Finance
008 Program 8 2 Finance
009 Program 9 3 Finance

Table 1

The default queries in CustomSettings.ini will not do this. Instead, MDT will install the all the first packages from each role, then the second packages , then the third perhaps something like this:

Order

Package

Sequence in Role

Role

001 Program 1 1 Everyone
002 Program 4 1 HR
003 Program 7 1 Finance
004 Program 2 2 Everyone
005 Program 5 2 HR
006 Program 8 2 Finance
007 Program 3 3 Everyone
008 Program 6 3 HR
009 Program 9 3 Finance

Table 2

In fact, the order of each sequence 1 package is also not guaranteed. This means that you have no control whether the sequence 1 packages from the Everyone role precede the sequence 1 packages from the HR or Finance roles.

To achieve the result in Table 1, you’ll need to add joins to your CustomSettings query. It turns out that MDT does in fact have a field called “Sequence” that denotes the order of the Computer Role that corresponds to the order you add it to the workbench. In our above example, Everyone is sequence 1, HR is sequence 2 and Finance is sequence 3. The sequence is unique to each computer, so you will have to query also for the computer either by serial number, UUID, Asset Tag or Mac Address.

Add the following query instead of RPackages to order the list of packages in their role sequence order:

[CRPackages]

SQLServer=<SQLServerName>

Database=<MDT Database Name>

Netlib=DBNMPNTW

SQLShare=<SQL Authentication Share>

Table=dbo.Settings_Packages AS sp INNER JOIN dbo.RoleIdentity AS ri ON sp.ID = ri.ID INNER JOIN dbo.Settings_Roles AS sr ON sr.Role = ri.Role INNER JOIN dbo.computerRoles AS cr ON ri.Role = cr.Role and sr.ID = cr.ID

Parameters=UUID, AssetTag, SerialNumber, MacAddress

ParameterCondition=OR

Order=sr.Sequence, sp.Sequence

The trick here is to order by the Sequence property in the Settings_Packages table as well as the Sequence property in the Settings_Roles table. The latter Sequence property is the order you give to your computer roles in the workbench.

You can do similar things for ordering Packages for Location Roles and Make/Model Roles. The following is for ordered Make/Model Roles Packages:

[MRPackages]

SQLServer=<SQLServerName>

Database=<MDT Database Name>

Netlib=DBNMPNTW

SQLShare=<SQL Authentication Share>

Table=dbo.Settings_Packages AS sp INNER JOIN dbo.RoleIdentity AS ri ON sp.ID = ri.ID INNER JOIN dbo.Settings_Roles AS sr ON sr.Role = ri.Role INNER JOIN dbo.MakeModelRoles AS mr ON ri.Role = mr.Role and sr.ID = mr.ID

Parameters=Make, Model

Order=sr.Sequence, sp.Sequence

You can then order the different types of role packages (i.e. Computer, Make Model or Location Role packages) in the Priority Field:

Priority= MRPackages, LRPackages, CRPackages

This can be useful if you want to ensure that BIOS updates get installed first as part of a Make Model Role, then Localized application packages in a Location role and finally the Everyone, HR or Finance Computer Role packages.

This post was contributed by Aly Shivji a consultant with Microsoft Services - U.S. East Region.

  • Thanks for sorting that out. Any idea as to why the default queries would be designed this way?

  • This looks great, how I can adapt this for the following scenario...

    I have multiple roles (about 15), including IBM applications tied to an IBM model role (I don't use the Make/Model as our IBM model/types vary too much here and new variations of models come in all the time e.g. x3550 7978-CBX, 7978-BCM etc.). So, to deploy via Lite Touch I tie a Computer to 3 roles - An OS, an IBM model and a Domain config.  This works well but the applications are as you mention here (ordered as one from each role until finished). How can I change my ini to order Applications as per table 1 (note I don't use Packages)? e.g. All the OS packages first, then all the IBM packages next etc. Thanks in advance

  • I have a need for the apps that are being installed as part of the deployment process to be installed in a certain order.

    The new Dell E series has some drivers software that needs to be installed before other apps.

    Im doing LTI,  I have make/model  deployment process with Roles as the desired deployments.

    In those roles, the software is in the order I would like them installed.

    This method I think is what I need, but do not know how to modify it for what I need to do.

    cna you post the way to sequence the software installs in the order I would like them to be installed ?  Thanks in advance.

    Jared

  • Hi Jared,

    I would suggest that one method to achieve this would be to add tasks to the task sequence for each model.

    This could follow the same logical process as the configuration manager driver management process I detailed in my previous blog post.

    The latest version has the ability to filter based on WMI.

    Adding all tasks to the task sequence should make it easier to control when applications are installed. The only problem is that you need to update the TS each time you add a new model.

    Thanks,

    Ben

  • Hey there i am currently doing a windows vista deployment using MDT 2008 and SCCM sp1 and i would like to know if there is a way to make it so that when i push the task sequence through sccm on pc's. the problem is that i want each pc to have a specific computer name. if i enter all the Pc's in my computers database with all info IE: MAC and computername will sccm use the database to recreate the names on the newly deployed machines?

  • Hey guys trying to do a deployment using MDT 2008 and SCCM to push out the image but the computer name that gets generated is generic MININT-iurer237 or whatever i have a requirement to have each computer name be something specific can i do this in the computer section of the database and if yes how?

  • does this thing work i have posted something twice now and nothing has come up it has been at least 24 hours

  • Apologies Ben,I didn't see your post until now.

    Yes definitely. Putting a value for ComputerName in the database for the computer will be assigned during a Config Manager deployment. Make sure you are using an MDT template task sequence in Config Manager and the configure step of the task sequence will add the database entries to your unattend file.

    Aly

  • Has this step been updated for the MDT 2010?  It appears to be working and sorting the applications in the correct order, but once you click next after the application screen, they revert back to the order inwhich they were added to the MDT.

  • I'm having problems with getting the Location based role packages. I'm using the below in my customsettings.ini but it seems to be pulling packages from make & models in to somehow. What did I do wrong? Does anyone have a working example of the this section?

    [LRPackages]

    SQLServer=DALPOCSQL14

    Database=MDT_DB

    Netlib=DBNMPNTW

    SQLShare=MDTDB$

    Table=dbo.Settings_Packages AS sp INNER JOIN dbo.RoleIdentity AS ri ON sp.ID = ri.ID INNER JOIN dbo.Settings_Roles AS sr ON sr.Role = ri.Role INNER JOIN dbo.LocationRoles AS lr ON ri.Role = lr.Role and sr.ID = lr.ID

    Parameters=DefaultGateway

    Order=sr.Sequence, sp.Sequence

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment