Windows 7 / Getting Started

Working with the MDT Database

Within MDT 2010, you have the option to create a database that can serve as a centralized repository for the settings that you specify in the CustomSettings.ini file. Instead of putting the settings in the CustomSettings.ini file, you configure the INI file to query the database for the settings to use.

The settings you specify depend on the following:

  • The settings specified when you defined the computer in the database
  • The location where the computer resides
  • The make and model of the computer

Creating the MDT Database

Before you start creating the MDT database, you must have a SQL Server available. You should have the sysadmin or dbcreator server roles.

Using SQL Express
You can use the free version of SQL Server, SQL Express, for your MDT database-the MDT database doesn't need all the features of the paid version. Keep in mind, though, that when using SQL Express, the name of the instance you use is SQLEXPRESS. If you use a named instance, you should enable the SQL Browser so that the named instance can be found on the network.

Start by opening the necessary ports on the firewall to enable access to the SQL Browser service:

  1. Open Windows Firewall from the Control Panel and select Allow A Program Or Feature Through Windows Firewall.
  2. Select Allow Another Program, and click Browse to browse to Sqlbrowser.exe, which you'll find in the \Microsoft SQL Server\90\Shared folder.
  3. On the Allowed Programs And Features screen, ensure that SQL Browser Service EXE is enabled for the network profile you are using-in our example, Domain (since our SQL Server is domain joined).

Now you can create the MDT database using the New DB Wizard:

  1. Open the Deployment Workbench and navigate to Deployment Shares → <your deployment share name> → Advanced Configuration → Database.
  2. From the Actions pane, select New Database to launch the New DB wizard.
  3. Fill in the name of the SQL Server that will host the MDT database and provide the name of the instance if the database is available in an instance other than the default one. Optionally, provide another port number if your SQL Server operates at a port other than the default port (port 1433).
    Also select how you want to connect to your SQL Server, either by using Named Pipes, which is the default, or by using TCP/IP Sockets. Click Next.
  4. On the Database page, select the option to create a new database and provide a name for the new database. Click Next.
  5. When using the Named Pipes option, you must specify a share name to which a connection will be made to ensure that authentication will work. You could, for example, specify a logs$ or any other share you created. Click Next. If you didn't select Named Pipes, then you have the TCP/IP option for which the difference is detailed in the section, "Using TCP/IP or Named Pipes."
  6. On the Summary page, verify the information and click Next.
  7. On the Confirmation page, click Finish to complete the New DB wizard.
Using TCP/IP or Named Pipes to Access the MDT DB
While accessing the MDT database with Windows PE, you cannot use integrated security using an Active Directory username and password if you are connecting to the database using TCP/IP. If you want to use TCP/IP, you must define a local SQL user with a corresponding password. When using named pipes, Windows PE will first make a network connection to the SQL Server, and based on that authentication, the database can be used. That's why you must supply a share name when configuring Named Pipes as the access method.

Using the MDT Database

After the database is successfully created, you will notice that the database node in the Deployment Workbench is extended with the following information:

  • Computers
  • Roles
  • Locations
  • Make and Model

Defining Comp uters

By using the Computers portion of the MDT database, you can uniquely identify computers in your organization. You must provide one of the following items: AssetTag, UUID, Serial Number, or MAC Address.

For each uniquely identified computer, you provide its own settings, which you would typically supply in CustomSettings.ini. namely to install MDT applications, install ConfigMgr Packages, and configure roles. You can also specify which users or groups should be included as local administrators. These settings are retrieved in the task sequence running on the computers by calling the ZTIGather.wsf script. To define a new computer in the MDT database, follow these steps:

  1. Open the Deployment Workbench and navigate to Deployment Shares → <your deployment share name> → Advanced Configuration → Database → Computers.
  2. Select New from the Actions pane; a new window opens.
  3. Provide one of the following values: Asset Tag, UUID, Serial Number, or MAC Address. This value will uniquely identify your machine. Optionally, you can supply a description for your machine.
  4. On the Details tab, you can enter custom values that would normally reside in CustomSettings.ini. These custom values are detailed in Table below.
    SectionSection settings used for...
    ADDS SettingsConfiguring domain controller (DC) installation-related settings, such as the path to store the Active Directory (AD) database, the domain's NetBIOS name, and the DC that will be used to replicate content.
    BitLockerConfiguring BitLocker-related settings, like the startup pin to use, the Trusted Platform Module (TPM) owner password, and whether the recovery password should be written to AD.
    DHCP Server SettingsConfiguring the DHCP role, such as the number of DHCP scopes to configure, the name for the scope, and the Starting IP Address for the scope.
    Disk SettingsConfiguring disk-related settings, like the number of partitions to create, the size of the partition, and its volume label.
    Display SettingsConfiguring display settings, such as the resolution, the refresh rate, and the color depth.
    DNS Server SettingsConfiguring the DNS Server role, like the DNS zone, the AD partition to store the DNS information, and whether to enable scavenging.
    Domain And WorkgroupConfiguring the computer to either join a workgroup or a domain, and if in a domain, which user to use to do the domain join, and in which OU the computer should become a member.
    IdentificationConfiguring the computer name and the registrar's name and organization.
    MiscellaneousConfiguring miscellaneous settings, like the administrator password, the home page, and the product key.
    NIC SettingsConfiguring settings related to the NIC, such as whether to enable DHCP, the name of the network adapter, and whether to enable or disable LMHOSTS.
    OS RolesConfiguring settings related to Windows Server 2003 or Windows Server 2008 roles and features.
    Regional And Locale SettingsConfiguring settings related to regional settings, like the time zone, the user interface language, and the keyboard layout.
    SMS 2003 OSDConfiguring settings related to using packages from SMS 2003. This setting is available only for backward compatibility. MDT 2010 does not support SMS 2003 Operating System Deployment Feature Pack.
    User DataConfiguring settings that can be used by the USMT.
    Wizard ControlConfiguring the pages that are presented to the user performing the installation. Here you can enable or disable pages.
    CustomDefining some extra options, like which role services should be installed, the number of the partition, and the disk to which the image should be deployed.
  5. On the Applications tab, select the applications defined in MDT that must be installed for this computer.
  6. On the ConfigMgr Packages tab, select the ConfigMgr packages that need to be installed for this computer.
  7. On the Roles tab, select to which role (a specific configuration) the computer should belong (you'll learn more about defining roles in the next section).
  8. On the Administrators tab, define which users or group should be added to the Administrators group.

Defining Roles

Roles in the MDT database can be assigned to multiple computers. For example, you can define a role that reflects computers for the finance department, containing all the applications needed for finance department staff and specific OU settings. Here are the steps:

  1. Open the Deployment Workbench and navigate to Deployment Shares → <your deployment share name> → Advanced Configuration → Database → Roles.
  2. Select New from the Actions pane; a new window opens.
  3. On the Identity tab, give the role a name.
  4. On the Details tab, provide the same values as described in Table below.
  5. On the Applications tab, select the applications defined in MDT that must be installed for this computer.
  6. On the ConfigMgr Packages tab, select the ConfigMgr packages that need to be installed for this computer.
  7. On the Administrators tab, define which users or group should be added to the Administrators group.

Defining Loca tions

Locations can be defined based on the gateway used by the client. You determine on which location a client resides, and specify custom settings based on that.

  1. Open the Deployment Workbench and navigate to Deployment Shares → <your deployment share name> → Advanced Configuration → Database → Locations.
  2. Select New from the Actions pane; a new window opens.
  3. On the Identify tab, provide a name for the location, such as Building 1, 3rd floor.
  4. On the Details tab, provide the values described in Table below.
  5. On the Applications tab, select the applications defined in MDT that must be installed for this computer.
  6. On the ConfigMgr Packages tab, select the ConfigMgr packages that need to be installed for this computer.
  7. On the Roles tab, specify which roles the location defined is a member of.
  8. On the Administrators tab, define which users or group should be added to the Administrators group.

Defining Make and Model

By defining make and model, you can install hardware applications for specific models or create specific network adapter settings.

  1. Open the Deployment Workbench and navigate to Deployment Shares → <your deployment share name> → Advanced Configuration → Database → Make And Model.
  2. Select New from the Actions pane; a new window opens.
  3. On the Identify tab, provide a make (which is the manufacturer) and the model (which is the configuration type).
  4. On the Details tab, provide the same values described in Table below.
  5. On the Applications tab, select the applications defined in MDT that must be installed for this computer.
  6. On the ConfigMgr Packages tab, select the ConfigMgr packages that need to be installed for this computer.
  7. On the Roles tab, specify which roles the location defined is a member of.
  8. On the Administrators tab, define which users or group should be added to the Administrators group.

Modifying CustomSettings.ini to Use the Database

After setting up the database, you need to configure your CustomSettings.ini so that it will query the database for the specified values. You can use the Configure DB wizard to generate the INI file.

  1. Open the Deployment Workbench and navigate to Deployment Shares → <your deployment share name> → Advanced Configuration → Database.
  2. Select Configure Database Rules from the Actions pane to launch the Configure DB wizard.
  3. On the Computer Options page, select the settings that should be queried on the database about individual computers:
    • Query For Computer-Specific Settings
    • Query For Roles Assigned To This Computer
    • Query For Applications To Be Installed On This Computer
    • Query For ConfigMgr Packages To Be Installed On This Computer
    • Query For Administrators To Be Assigned To This Computer
  4. On the Locations Options page, select the settings that should be queried on the database about locations:
    • Query For Location Names Based On Default Gateways
    • Query For Location-Specific Settings
    • Query For Roles Assigned For This Location
    • Query For Applications To Be Installed For This Location
    • Query For ConfigMgr Packages To Be Installed For This Location
    • Query For Administrators To Be Assigned For This Location
  5. On the Make/Model Options page, select the settings that should be queried on the database about the defined make and model combinations:
    • Query For Model Specific Settings
    • Query For Roles Assigned To Computers With This Make And Model
    • Query For Applications To Be Installed On Computers With This Make And Model
    • Query For ConfigMgr Packages To Be Installed On Computers With This Make And Model
    • Query For Administrators To Be Assigned To Machines With This Make And Model
  6. On the Role Options page, select the settings that should be queried on the database about the defined roles:
    • Query For Roles Specific Settings
    • Query For Applications To Be Installed For This Role
    • Query For ConfigMgr/SMS Packages To Be Installed For This Role
    • Query For Administrators To Be Assigned For This Role

You can view the settings in the Control folder on your deployment share in CustomSettings .ini. The file should look similar to the example in Listing below.

Listing: CustomSettings.ini after the Configure DB wizard completes
[Settings]
Priority=CSettings, CPackages, CApps, CAdmins, CRoles, Locations, LSettings,
LPackages, LApps, LAdmins, LRoles, MMSettings, MMPackages, MMApps, MMAdmins,
MMRoles, RSettings, RPackages, RApps, RAdmins, Default
Properties=MyCustomProperty
[Default]
OSInstall=Y
SkipAppsOnUpgrade=YES
SkipCapture=NO
SkipAdminPassword=YES
SkipProductKey=YES
[CSettings]
SQLServer=srv-sql01.vansurksum.local
Database=MDT
Netlib=DBNMPNTW
SQLShare=logs$
Table=ComputerSettings
Parameters=UUID, AssetTag, SerialNumber, MacAddress
ParameterCondition=OR
[CPackages]
SQLServer=srv-sql01.vansurksum.local
Database=MDT
Netlib=DBNMPNTW
SQLShare=logs$
Table=ComputerPackages
Parameters=UUID, AssetTag, SerialNumber, MacAddress
ParameterCondition=OR
Order=Sequence
[CApps]
SQLServer=srv-sql01.vansurksum.local
Database=MDT
Netlib=DBNMPNTW
SQLShare=logs$
Table=ComputerApplications
Parameters=UUID, AssetTag, SerialNumber, MacAddress
ParameterCondition=OR
Order=Sequence
[CAdmins]
SQLServer=srv-sql01.vansurksum.local
Database=MDT
Netlib=DBNMPNTW
SQLShare=logs$
Table=ComputerAdministrators
Parameters=UUID, AssetTag, SerialNumber, MacAddress
ParameterCondition=OR
[CRoles]
SQLServer=srv-sql01.vansurksum.local
Database=MDT
Netlib=DBNMPNTW
SQLShare=logs$
Table=ComputerRoles
Parameters=UUID, AssetTag, SerialNumber, MacAddress
ParameterCondition=OR
[Locations]
SQLServer=srv-sql01.vansurksum.local
Database=MDT
Netlib=DBNMPNTW
SQLShare=logs$
Table=Locations
Parameters=DefaultGateway
[LSettings]
SQLServer=srv-sql01.vansurksum.local
Database=MDT
Netlib=DBNMPNTW
SQLShare=logs$
Table=LocationSettings
Parameters=DefaultGateway
[LPackages]
SQLServer=srv-sql01.vansurksum.local
Database=MDT
Netlib=DBNMPNTW
SQLShare=logs$
Table=LocationPackages
Parameters=DefaultGateway
Order=Sequence
[LApps]
SQLServer=srv-sql01.vansurksum.local
Database=MDT
Netlib=DBNMPNTW
SQLShare=logs$
Table=LocationApplications
Parameters=DefaultGateway
Order=Sequence
[LAdmins]
SQLServer=srv-sql01.vansurksum.local
Database=MDT
Netlib=DBNMPNTW
SQLShare=logs$
Table=LocationAdministrators
Parameters=DefaultGateway
[LRoles]
SQLServer=srv-sql01.vansurksum.local
Database=MDT
Netlib=DBNMPNTW
SQLShare=logs$
Table=LocationRoles
Parameters=DefaultGateway
[MMSettings]
SQLServer=srv-sql01.vansurksum.local
Database=MDT
Netlib=DBNMPNTW
SQLShare=logs$
Table=MakeModelSettings
Parameters=Make, Model
[MMPackages]
SQLServer=srv-sql01.vansurksum.local
Database=MDT
Netlib=DBNMPNTW
SQLShare=logs$
Table=MakeModelPackages
Parameters=Make, Model
Order=Sequence
[MMApps]
SQLServer=srv-sql01.vansurksum.local
Database=MDT
Netlib=DBNMPNTW
SQLShare=logs$
Table=MakeModelApplications
Parameters=Make, Model
Order=Sequence
[MMAdmins]
SQLServer=srv-sql01.vansurksum.local
Database=MDT
Netlib=DBNMPNTW
SQLShare=logs$
Table=MakeModelAdministrators
Parameters=Make, Model
[MMRoles]
SQLServer=srv-sql01.vansurksum.local
Database=MDT
Netlib=DBNMPNTW
SQLShare=logs$
Table=MakeModelRoles
Parameters=Make, Model
[RSettings]
SQLServer=srv-sql01.vansurksum.local
Database=MDT
Netlib=DBNMPNTW
SQLShare=logs$
Table=RoleSettings
Parameters=Role
[RPackages]
SQLServer=srv-sql01.vansurksum.local
Database=MDT
Netlib=DBNMPNTW
SQLShare=logs$
Table=RolePackages
Parameters=Role
Order=Sequence
[RApps]
SQLServer=srv-sql01.vansurksum.local
Database=MDT
Netlib=DBNMPNTW
SQLShare=logs$
Table=RoleApplications
Parameters=Role
Order=Sequence
[RAdmins]
SQLServer=srv-sql01.vansurksum.local
Database=MDT
Netlib=DBNMPNTW
SQLShare=logs$
Table=RoleAdministrators
Parameters=Role
[Previous] [Contents] [Next]