MDT: use with a database

In this tutorial, we will see how to use MDT with a database.

The use of this one makes it possible to store in a database the information of deployment for a station to identify for example by its MAC address, which makes it possible when one has to redo the post to pre-fill all the information like :

  • The name of the computer
  • The domain or the working group
  • The image
  • Applications

Prerequisites

  • Know the deployment of Windows.
  • Have MDT install and configure.
  • Having a SQL Server (Express) for creating the database, the MDT server must be allowed to connect to it.

Configure the database

From the DeploymentWorkbench (MDT) console, unfold the Advanced Configuration 1 folder, right click on Database 2 and click on New Database 3 .

New database - mdt

Enter the server name 1 and the SQL instance 2 , configure the connection mode to the 3 instance and then click Next 4 .

Config server sql

If necessary, configure port 1433 for TCP / IP access

Choose the option Create a new database 1 , enter the database name 2 and click Next 3 .

Config database

Enter the name of the deployment share 1 and click Next 2 .

Config share

If the share is not filled in, you must then indicate an account authorized to connect to the database.

A summary is displayed, click on Next 1 .

Resume

Once the database is created, click on Finish to close the wizard.

Database created

We can now switch to the MDT configuration to use the database.

Configure MDT

The example of use after the configuration only on adding the computer and assigning the task, I only activate the necessary rules.

Right click on Database 1 and click Configure Databases Rules 2 .

Add rules

Computer Options: select Query for computer-specific settings 1 and click Next 2 .

Select rule

For other options deselect all by clicking the Deselect All button. To summarize the rules to add, click Next 1 .

confirm add rule

Once the rules are added, close the wizard by clicking on Finish 1 .

Rule added

If we look at the CustomSetting.ini file (Deployment Share Properties / Rules tab), CSettings has been added to the Priority parameter and the following section has been added:

[CSettings]
SQLServer=SERVER
Instance=SQLEXPRESS
Port=1433
Database=MDT
Netlib=DBMSSOCN
Table=ComputerSettings
Parameters=UUID, AssetTag, SerialNumber, MacAddress
ParameterCondition=OR

In case the sharing has not been configured, add the following lines to the section (adapt to your environment):

DBID=User
DBPWD=Password

Now that MDT is configured, we will see a use case.

Example of use

In this part, we will add a computer to the database that will be identified by the MAC address of its network card and we will assign the following parameters:

  • Name of the computer
  • Workgroup
  • TaskSequenceID(Deployment sequence)

Before you begin, you must recover the address of the network card.

Get MAC

Under Hyper-V, the virtual machine must have been started before a MAC address is assigned to the adapter.

From the MDT console, go to Database / Computers 1 , right click in the middle area and click on New 2 .

New computer

Enter a description 1 , Asset TAG 2 , MAC address 3 and click Apply 4 .

Computer identity

Go to the Details tab 1 and enter the properties JoinWorkgroup 2 , OSDComputerName 3 , TaskSequenceID 4 then click Apply 5 and OK 6> >.

Launch a deployment, the task sequence should be selected and the name and workgroup completed.

Conclusion

The use of the MDT database allows a great automation of the deployment with a minimum of human intervention provided that it can feed it automatically using tools such as GLPI / OCSInventory …

This example shows that a small part of what is possible to do the database, it is possible to add roles (Deployment tasks + software), to make the configuration compared to a model of computer or even of location relative to the IP address of the gateway.

The main disadvantage as any database and feed and keep it up to date.

Use by MAC address can be useful for training room positions that the we redo regularly and limit human intervention.




Leave a Comment