Adding Custom Properties to the MDT Database – Extending the Schema

Heyo,

There’s been a couple of occasions where we’ve needed to store additional settings in the MDT Database, for example storing AD groups, or the OU that the computer was last in before rebuilding.

The process is straight forward, using SQL Server Management Studio, open up the MDT Database, edit the Settings table, add your custom column, and save the changes.

 

After adding your property you should run the following commands to refresh any dependent views. The sp_refreshview stored procedure is required to update views when the columns in dependent tables or views have changed. Open a new query window and run the following:

To reference the new property as a variable in the task sequence you need to add the property to the CustomSettings.ini file. Under the [settings] section, on the properties line add the name of your custom property like so:

After you save your changes to CustomSettings.ini you can test if the new property is working. Make sure you have entered something in the database for the device you’re testing and run the following command replacing DeploymentShare with your deployment share path:

In the output of the gather script you should see your custom property declared and that the value is being read from SQL.

Leave a Reply

Your email address will not be published. Required fields are marked *