If you would like to read previous articles in this series, please go to:
- Deploying Windows 7 – Part 1: Windows AIK 2.0 Enhancements
- Deploying Windows 7 – Part 2: Using DISM
- Deploying Windows 7 – Part 3: Understanding MAP 4.0
- Deploying Windows 7 – Part 4: Using MAP 4.0
- Deploying Windows 7 – Part 5: MDT 2010 Enhancements
- Deploying Windows 7 – Part 6: Lite Touch using MDT 2010
- Deploying Windows 7 – Part 7: Automated LTI Deployment
- Deploying Windows 7 – Part 8: Understanding LTI Configuration Files
- Deploying Windows 7 – Part 9: Deploying 32-bit vs. 64-bit Windows
- Deploying Windows 7 – Part 10: Capturing and Deploying an Image of a Reference Computer
- Deploying Windows 7 – Part 11: Capturing an Existing Installation
- Deploying Windows 7 – Part 12: Planning for Application Compatibility
- Deploying Windows 7 – Part 13: Manual Migration from Windows XP to Windows 7
- Deploying Windows 7 – Part 14: Automated Migration from Windows XP to Windows 7
- Deploying Windows 7 – Part 16: Using the MDT Database
- Deploying Windows 7 – Part 17: Deploying Applications Based on Make and Model
- Deploying Windows 7 – Part 18: Determining the UUID of a Computer
- Deploying Windows 7 – Part 19: Building a Custom WinPE Tools CD
- Deploying Windows 7 – Part 20: Securing MDT (Part 1)
- Deploying Windows 7 – Part 21: Securing MDT (Part 2)
- Deploying Windows 7 – Part 22: Bulk Populating the MDT Database Using PowerShell
- Deploying Windows 7 – Part 23: Managing Drivers – Introduction
- Deploying Windows 7 – Part 24: Managing Drivers – Issues and Approaches
- Deploying Windows 7 – Part 25: Managing Drivers – Selection Profiles
- Deploying Windows 7 – Part 26: Managing Drivers – By Make and Model
- Deploying Windows 7 – Part 27: Managing Drivers – Tips and Tricks
- Deploying Windows 7 – Part 28: Managing Software Updates
- Deploying Windows 7 – Part 29: Completing the LTI Deployment Infrastructure
Tip:
You can find more information about automating LTI deployment in the Windows 7 Resource Kit from Microsoft Press. I’m the lead author for this Resource Kit and I also maintain the Unofficial Support Site for the Windows 7 Resource Kit where you will find the latest updates and other useful information.
Understanding the MDT Database
So far in this series of articles we have learned how to use MDT 2010 to perform a Lite Touch (LTI) deployment of Windows 7 onto a single computer, either manually or fully-automated. But what if you need to deploy Windows 7 onto dozens or even hundreds of computers? What if you want specific names assigned to each computer? What if you want one group of computers to have one set of Windows features installed, another group to have other features, and so on? What if you want computers at one location to have one set of applications installed, and those at a different location to have a different set of applications installed?
If you want to perform mass deployments like this and customize what drivers, features or applications are installed according to the computer’s hardware, location or role, you can accomplish this with MDT by using the MDT database. The MDT database is basically a Microsoft SQL Server-based version of the CustomSettings.ini file that can be used as a central repository for storing the configuration settings used to deploy multiple computers using MDT. Without the MDT database, you would need to create a separate CustomSettings.ini file for each computer you want to deploy using MDT and then copy/paste this file into MDT each time you deploy a new computer. With the MDT database, you only have one CustomSettings.ini file for all computers, plus a SQL database that contains the customizations specific to each computer.
Installing SQL Server 2008 Express
Before you can create and configure the MDT database, you must prepare your environment by installing and configuring one of the following versions of SQL Server in your environment:
- SQL Server 2005
- SQL Server 2008
- SQL Server 2008 Express
You can install SQL Server either on the MDT computer itself or on a separate computer on your network.
For this example, we will install SQL Server 2008 Express on our MDT computer which is a domain controller SEA-DC1.contoso.com in our test environment running Windows Server 2008 R2. If you install your SQL Server 2008 Express instance on a different platform such as Windows Server 2008 or Windows Server 2003 SP2, you will first need to install the following two items which are prerequisites for installing SQL Server 2008 Express:
Begin by downloading SQL Server 2008 Express SP1 from the Microsoft Download Center. Then double-click on SQLEXPR_platform_ENU.exe where platform is either x64 or x86 (for Windows Server 2008 R2 platform must be x64) to open the SQL Server Installation Center (Figure 1):
Figure 1: The SQL Server Installation Center
Next, click Installation on the left to display the various installation options (Figure 2):
Figure 2: Options for installing SQL Server 2008 Express
Next, click “New SQL Server stand-alone installation or add Features to an existing installation” to launch the SQL Server 2008 Setup wizard. Skip the product key page since the Express version is free and doesn’t require you to specify a product key, then accept the EULA. At this point the page for installing the Setup Support Files is displayed (Figure 3):
Figure 3: Installing the Setup Support Files
Click Install to install the Setup Support files. Once these are installed, the Setup Support Rules run to check whether your computer can support installation of SQL Server 2008 Express (Figure 4):
Figure 4: Verifying the computer supports installing SQL Server 2008 Express
Note that we get two warnings in this example. First, installing SQL Server on a domain controller is not recommended, but it is actually fine to do this for a test environment like the one we are using here. And second, Windows Firewall is currently blocking remote computers from being able to access the SQL Server instance we are going to install—we will deal with this later in this article.
On the Feature Selection page, select Database Engine Services (Figure 5):
Figure 5: Selecting features to install
Accept the defaults on the Instance Configuration page (Figure 6):
Figure 6: Installing a new instance of SQL Server 2008 Express
On the Disk Space Requirements page, verify that the computer has sufficient disk space for the install (Figure 7):
Figure 7: Disk Space Requirements page
The Server Configuration page lets you specify a service account for each SQL Server service (Figure 8).
Figure 8: Server Configuration page
For our test environment, we will use the same account for each SQL Server service. To do this, click “Use the same account for all SQL Server services” and type CONTOSO\Administrator and the password for the account (Figure 9):
Figure 9: Specifying a service account for all SQL Server services
On the Database Engine Configuration page, add the CONTOSO\Administrator account to the list of SQL Server administrators (Figure 10). Since we are logged onto the computer using this account, you can add it to the list by clicking Add Current User. Leave the remaining settings as they are.
Figure 10: Adding CONTOSO\Administrator to the list of SQL Server administrators
Accept the defaults on the Error and Usage Reporting page, then click Next to run the Installation Rules to determine whether the installation will succeed (Figure 11):
Figure 11: The installation will succeed
On the Ready to Install page, verify the installation options you have selected (Figure 12):
Figure 12: Verify installation options
Now click Install and view the progress of the installation. When the installation has finished, click Close to close the wizard.
Configuring SQL Server 2008 Express
Once SQL Server 2008 has been installed, it needs to be configured so that MDT can use it. To do this, begin by clicking Start, All Programs, Microsoft SQL Server 2008, Configuration Tools, SQL Server Configuration Manager. This opens the SQL Server Configuration Manager console which you can use to configure SQL Server protocols, services, and other features. Expand the local server node, then expand SQL Server Network Configuration, and select Protocols for SQLEXPRESS. Then right-click on Named Pipes and select Enabled (Figure 13):
Figure 13: Enabling named pipes for the SQLEXPRESS instance
Enabling Named Pipes like this for SQL Server is needed so that the Deployment Workbench can connect to the database, and also to enable client computers to connect to the database.
Next, select the SQL Server Services node beneath the root node (Figure 14):
Figure 14: Configuring SQL Server services
Note that the SQL Server Browser services is currently stopped and in fact is disabled. Right-click on this service and select Properties, select the Service tab, and change the Start Mode of the service from Disabled to Automatic (Figure 15):
Figure 15: Enabling the SQL Server Browser service
Next, right-click on the SQL Server Browser service and select Start to start the service. Then right-click on the SQL Server (SQLEXPRESS) service and select Restart. These service modifications are needed in order that client computers can make a connection to the named instance “SQLEXPRESS”.
Next, open Windows Firewall from Control Panel and click “Allow a program or feature through Windows Firewall.” Then click Allow Another Program and browse as shown in Figure 16 until you can select the following executable:
C:\Program Files\Microsoft SQL Server (x86)\90\Shared\sqlbrowser.exe
Figure 16: Opening a program exception in Windows Firewall: step 1
Once you have selected this executable, click Open to return to the Add A Program dialog box (Figure 17):
Figure 17: Opening a program exception in Windows Firewall: step 2
Then click Add and the new program exception is displayed in Windows Firewall (Figure 18):
Figure 18: Opening a program exception in Windows Firewall: step 3
Finally, do the same to add another program exception for the following executable:
C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\binn\sqlservr.exe
These firewall exceptions are necessary to allow client computers to establish a connection to the SQL Server and SQL Browser services.
Tip:
Instead of creating exceptions manually like this, you can use the batch script of netsh commands found in KB 968872 to open the necessary firewall ports for SQL Server.
Creating the MDT Database
At this point, SQL Server Express is installed and configured. The final step is to create a new database in MDT. To do this, open the Deployment Workbench and under your deployment share expand Advanced Configuration to display Database. Then right-click on Database and select New Database (Figure 19):
Figure 19: Creating a new MDT database: step 1
On the SQL Server Details page of the New DB Wizard, type the name of the SQL Server (here the same as the MDT computer) and the database instance (SQLEXPRESS) and make sure Named Pipes is selected as the network library (Figure 20):
Figure 20: Creating a new MDT database: step 2
On the Database wizard page, select Create A New Database and specify a name for your new database (Figure 21):
Figure 21: Creating a new MDT database: step 3
On the SQL Share page, type the share name of your deployment share so that WinPE can establish a connection to your SQL Server database using Windows integrated authentication (Figure 22):
Figure 22: Creating a new MDT database: step 4
Once you have finished the wizard without errors, the Database page will look something like Figure 23:
Figure 23: The new MDT database has been created
Conclusion
This article examined how to install SQL Server 2008 Express SP1 on your MDT computer and create a new MDT database. In the articles that follow, we will look at how to use this database to centrally store configuration settings for deploying Windows 7 to multiple computers using MDT.
If you would like to read previous articles in this series, please go to:
- Deploying Windows 7 – Part 1: Windows AIK 2.0 Enhancements
- Deploying Windows 7 – Part 2: Using DISM
- Deploying Windows 7 – Part 3: Understanding MAP 4.0
- Deploying Windows 7 – Part 4: Using MAP 4.0
- Deploying Windows 7 – Part 5: MDT 2010 Enhancements
- Deploying Windows 7 – Part 6: Lite Touch using MDT 2010
- Deploying Windows 7 – Part 7: Automated LTI Deployment
- Deploying Windows 7 – Part 8: Understanding LTI Configuration Files
- Deploying Windows 7 – Part 9: Deploying 32-bit vs. 64-bit Windows
- Deploying Windows 7 – Part 10: Capturing and Deploying an Image of a Reference Computer
- Deploying Windows 7 – Part 11: Capturing an Existing Installation
- Deploying Windows 7 – Part 12: Planning for Application Compatibility
- Deploying Windows 7 – Part 13: Manual Migration from Windows XP to Windows 7
- Deploying Windows 7 – Part 14: Automated Migration from Windows XP to Windows 7
- Deploying Windows 7 – Part 16: Using the MDT Database
- Deploying Windows 7 – Part 17: Deploying Applications Based on Make and Model
- Deploying Windows 7 – Part 18: Determining the UUID of a Computer
- Deploying Windows 7 – Part 19: Building a Custom WinPE Tools CD
- Deploying Windows 7 – Part 20: Securing MDT (Part 1)
- Deploying Windows 7 – Part 21: Securing MDT (Part 2)
- Deploying Windows 7 – Part 22: Bulk Populating the MDT Database Using PowerShell
- Deploying Windows 7 – Part 23: Managing Drivers – Introduction
- Deploying Windows 7 – Part 24: Managing Drivers – Issues and Approaches
- Deploying Windows 7 – Part 25: Managing Drivers – Selection Profiles
- Deploying Windows 7 – Part 26: Managing Drivers – By Make and Model
- Deploying Windows 7 – Part 27: Managing Drivers – Tips and Tricks
- Deploying Windows 7 – Part 28: Managing Software Updates
- Deploying Windows 7 – Part 29: Completing the LTI Deployment Infrastructure