The Microsoft Deployment Toolkit 2010 allows you to define roles which can contain lists of packages. You can stack these roles on top of each other in layers out of the box, but what if you wanted to nest roles? One reason to do this is if you extend the concept of an MDT role to dependencies. If each MDT role represents an application with dependencies, you may only want to define the dependencies once and then nest the parent role as if it were a regular applications in the console.
For example, if your organization wanted to deploy applications with a logical structure below, you may only want to list the dependencies of Contoso App once in the MDT console regardless how many times you used it.
In order to nest MDT roles , you will first need to define what a nested role looks like in the console. The MDT Workbench does validation of the string entered for an applicaiton so you will have to follow the format. One possible syntax is “ROLE0000:RoleName” as below:
Next you need to create a helper view in the MDT Database that can recursively find nested Roles. Download the SQL script below to create the view. Creating the view will not affect any other tables or views in the MDT database.
Finally, edit your customsettings.ini file to have the following in the RolePackages section.
This post was contributed by Aly Shivji a consultant with Microsoft Services – U.S. East Region.