Nesting MDT Roles

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.


Happy Nesting!

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

Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the Terms of Use.

Comments (1)

  1. Anonymous says:

    Very interesting article. The "Settings_Roles" table would actually be able to take those assignments out of the box. There is just no easy way to manage them. So a really nice workaround.



Skip to main content