Microsoft Deployment Toolkit Samples Guide
Microsoft Deployment Toolkit Samples Guide
The information in this document and any document referenced herein is provided for informational purposes
only, is provided AS IS AND WITH ALL FAULTS and cannot be understood as substituting for customized
service and information that might be developed by Microsoft Corporation for a particular user based upon that
users particular environment. RELIANCE UPON THIS DOCUMENT AND ANY DOCUMENT REFERENCED
HEREIN IS AT THE USERS OWN RISK.
2012 Microsoft Corporation. All rights reserved.
If the user of this work is using the work SOLELY FOR NON-COMMERCIAL PURPOSES INTERNALLY
WITHIN A COMPANY OR ORGANIZATION, then this work is licensed under the Creative Commons AttributionNonCommercial License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/2.5 or
send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.
MICROSOFT CORPORATION PROVIDES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO
THE INFORMATION CONTAINED IN THIS DOCUMENT AND ANY DOCUMENT REFERENCED HEREIN.
Microsoft Corporation provides no warranty and makes no representation that the information provided in this
document or any document referenced herein is suitable or appropriate for any situation, and Microsoft
Corporation cannot be held liable for any claim or damage of any kind that users of this document or any
document referenced herein may suffer. Your retention of and/or use of this document and/or any document
referenced herein constitutes your acceptance of these terms and conditions. If you do not accept these terms
and conditions, Microsoft Corporation does not provide you with any right to use any part of this document or
any document referenced herein.
Complying with the applicable copyright laws is the responsibility of the user. Without limiting the rights under
copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or
transmitted in any form or by any means (electronic, mechanical, photocopying, recording or otherwise), or for
any purpose, without the express written permission of Microsoft Corporation.
Microsoft may have patents, patent applications, trademarks, copyrights or other intellectual property rights
covering subject matter within this document. Except as provided in any separate written license agreement
from Microsoft, the furnishing of this document does not give you, the user, any license to these patents,
trademarks, copyrights or other intellectual property.
Information in this document, including URL and other Internet Web site references, is subject to change without
notice. Unless otherwise noted, the example companies, organizations, products, domain names, e-mail
addresses, logos, people, places and events depicted herein are fictitious, and no association with any real
company, organization, product, domain name, e-mail address, logo, person, place or event is intended or
should be inferred.
Microsoft, Active Directory, SQL Server, Visual Basic, Windows, Windows Live, Windows PowerShell, Windows
Server, and Windows Vista are either registered trademarks or trademarks of Microsoft Corporation in the
United States and/or other countries.
The names of actual companies and products mentioned herein may be the trademarks of their respective
owners.
Contents
Introduction to the Microsoft Deployment Toolkit Samples Guide..............................................
Deploying Windows 8 Applications Using MDT............................................................................
Deploying Windows 8 Applications Using LTI..............................................................................
Deploying Windows 8 Applications Using UDI............................................................................
Managing MDT Using Windows PowerShell..................................................................................
Loading the MDT Windows PowerShell Snap-In.........................................................................
Load the MDT Windows PowerShell Snap-In Using the Import System Modules
Task......................................................................................................................................
Load the MDT Windows PowerShell Snap-In Using the Add-PSSnapIn Cmdlet.................
Creating a Deployment Share Using Windows PowerShell........................................................
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
microsoft.com/technet/SolutionAccelerators
Additional Considerations...................................................................................................
Manually Enabling the Installation of Mass Storage Device Drivers.........................................
Automating the Installation of Mass Storage Device Drivers.....................................................
Additional Considerations..........................................................................................................
Replacing an Existing Computer with a New Computer Using Configuration
Manager 2007 R3............................................................................................................................
Creating a Computer Association..............................................................................................
Creating a Task Sequence to Save User State Information from the Existing
Computer...................................................................................................................................
Modifying CustomSettings.ini Properties for the Existing Computer Task Sequence................
Creating a Task Sequence Advertisement for the Existing Computer.......................................
Creating a Task Sequence to Deploy the Operating System to the New Computer.................
Modifying CustomSettings.ini Properties for the New Computer Task Sequence.....................
Creating a Task Sequence Advertisement for the New Computer............................................
Deploying an Operating System to a New Computer Not in the Configuration
Manager Database..........................................................................................................................
Configuring Conditional Task Sequence Steps...........................................................................
Configuring a Conditional Task Sequence Step........................................................................
IF Statements in Conditions......................................................................................................
Task Sequence Variables in Conditions.....................................................................................
Operating System Version in Conditions...................................................................................
File Properties in Conditions......................................................................................................
Folder Properties in Conditions.................................................................................................
Registry Settings in Conditions..................................................................................................
WMI Queries in Conditions........................................................................................................
Installed Software in Conditions................................................................................................
Complex Conditions..................................................................................................................
Creating a Highly Scalable LTI Deployment Infrastructure.........................................................
Ensuring That the Appropriate Infrastructure Exists..................................................................
Adding Content to MDT.............................................................................................................
Preparing Windows Deployment Services................................................................................
Configuring Distributed File System Replication.......................................................................
Preparing for SQL Server Replication.......................................................................................
Configuring SQL Server Replication..........................................................................................
Configure a SQL Server Publisher.....................................................................................
Enable the MDT DB for Replication...................................................................................
Create a Publication of the MDT DB..................................................................................
Subscribe Child Deployment Servers to the Published MDT DB.......................................
Configure CustomSettings.ini.............................................................................................
Selecting a Local MDT Server When Multiple Servers Exist......................................................
Understanding LocationServer.xml............................................................................................
Understand When to Use LocationServer.xml...................................................................
Creating the LocationServer.xml File.........................................................................................
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
microsoft.com/technet/SolutionAccelerators
Option 3: Use Multicasting with MDT and the Windows Server 2008 Windows
Deployment Services Role.......................................................................................................
Performing Staged Deployments Using MDT (OEM Preload)..................................................
Overview of the OEM Preload Process in MDT......................................................................
Overview of MDT Configuration Files in the OEM Preload Process................................
Overview of MDT Log Files in the OEM Preload Process................................................
Staged Deployments Using LTI...............................................................................................
LTI OEM Preload ProcessPhase 1: Create a Media-Based Image..............................
LTI OEM Preload ProcessPhase 2: Apply the Image to the Target Computer
.........................................................................................................................................
LTI OEM Preload ProcessPhase 3: Complete Target Computer Deployment
.........................................................................................................................................
Configuring Configuration Manager 2007 R3 Programs to Allow Package Installation
via Task Sequences......................................................................................................................
Using Windows PowerShell to Perform Common Tasks..........................................................
Creating a New Deployment Share.........................................................................................
Creating a Folder.....................................................................................................................
Deleting a Folder.....................................................................................................................
Importing a Device Driver........................................................................................................
Deleting a Device Driver..........................................................................................................
Importing an Operating System Package................................................................................
Deleting an Operating System Package..................................................................................
Importing an Operating System...............................................................................................
Deleting an Operating System.................................................................................................
Creating an Application............................................................................................................
Deleting an Application............................................................................................................
Creating a Task Sequence.......................................................................................................
Deleting a Task Sequence.......................................................................................................
Creating an MDT DB...............................................................................................................
Creating a Selection Profile.....................................................................................................
Updating a Deployment Share................................................................................................
Creating a Linked Deployment Share......................................................................................
Updating a Linked Deployment Share.....................................................................................
Deleting a Linked Deployment Share......................................................................................
Creating Media........................................................................................................................
Generating Media....................................................................................................................
Deleting Media.........................................................................................................................
Delaying Domain Join to Avoid Application of Group Policy Objects.....................................
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide
Center 2012
Configuration Manager
Feedback
Microsoft Connect is a place for you to submit bugs and suggestions for
Microsoft productsincluding Microsoft Solution Acceleratorsthat
Microsoft will consider for future releases. When you join the site, you will
be able to:
Find Microsoft products that are currently accepting feedback from the
community
microsoft.com/technet/SolutionAccelerators
Guide Title
Approval is automatic.
5. In the navigation pane, click Feedback.
Please provide feedback on the usefulness of this guide by filling out the
survey at http://go.microsoft.com/fwlink/?LinkID=132579.
Note At this time, deployment of Windows 8 application packages using ZTI is not available.
Ensure that you copy the Windows 8 application .appx file and any
other required files, such as a .cer file that contains the application
certificate.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
4. Select the LTI application item created in the previous step in an LTI task
sequence.
Ensure that you copy the Windows 8 application .appx file and any
other required files, such as a .cer file that contains the application
certificate.
3. Add the Windows 8 application as a Configuration Manager 2012 application
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
11
microsoft.com/technet/SolutionAccelerators
Note The Windows 8 application is not installed by the task sequence but rather will be
installed the first time the user logs on to the targeted computer (as defined by the UDA setting
configured in step 5) using the User-Centric App Installer feature (AppInstall.exe) in UDI.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
13
Load the MDT Windows PowerShell snap-in using the Window PowerShell
Modules console as described in Load the MDT Windows PowerShell SnapIn Using the Import System Modules Task.
Load the MDT Windows PowerShell snap-in using the Add-PSSnapIn cmdlet
as described in Load the MDT Windows PowerShell Snap-In Using the AddPSSnapIn Cmdlet.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
You can start a Windows PowerShell console with the Import System
Modules task by performing one of the following procedures:
In the taskbar, right-click the Windows PowerShell icon, and then click
Import System Modules.
Load the MDT Windows PowerShell Snap-In Using the AddPSSnapIn Cmdlet
You can load the MDT Windows PowerShell snap-in
Microsoft.BDD.PSSnapInfrom any Windows PowerShell environment
using the Add-PSSnapIn cmdlet, as show in the following example:
Add-PSSnapin -Name Microsoft.BDD.PSSnapIn
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
15
The call to the win32_share class returns the results of the call. If the
value of ReturnValue is zero (0), then the call was successful.
4. Specify the new shared folder as a deployment share using the New-PSDrive
cmdlet, as shown in the following example:
New-PSDrive -Name "DS002" -PSProvider "MDTProvider" -Root
"C:\MDTDeploymentShare$" -Description "MDT Deployment Share Created
with Cmdlets" -NetworkPath "\\WDG-MDT-01\MDTDeploymentShare$"
-Verbose
5. Verify that the appropriate deployment share folders have been created using
the dir command, as show in the following example:
dir ds002:
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
3. Verify that the MDT deployments that share Windows PowerShell drives are
restored properly using the Get-PSDrive cmdlet, as follows:
Get-PSDrive -PSProvider Microsoft.BDD.PSSnapIn\MDTProvider
The list of Windows PowerShell drives that are provided using the
MDTProvider are listed.
4. View the properties of the deployment share using the Get-ItemProperty
cmdlet, as shown in the following example:
Get-ItemProperty "DS002:"
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
17
3. View the list of MDT deployments that share Windows PowerShell drives, one
for each deployment share, using the Get-PSDrive cmdlet, as follows:
Get-PSDrive -PSProvider Microsoft.BDD.PSSnapIn\MDTProvider
microsoft.com/technet/SolutionAccelerators
2. Ensure that the MDT deployments that share Windows PowerShell drives are
restored using the Restore-MDTPersistentDrive cmdlet, as shown in the
following example:
Restore-MDTPersistentDrive -Verbose
Note If the MDT deployments that share Windows PowerShell drives are already restored,
you will receive a warning message indicating that the cmdlet is unable to restore the drive.
3. Verify that the MDT deployments that share Windows PowerShell drives are
restored properly using the Get-PSDrive cmdlet, as follows:
Get-PSDrive -PSProvider Microsoft.BDD.PSSnapIn\MDTProvider
microsoft.com/technet/SolutionAccelerators
Guide Title
19
Restore-MDTPersistentDrive -Verbose
Note If the MDT deployments that share Windows PowerShell drives are already restored,
you will receive a warning message indicating that the cmdlet is unable to restore the drive.
3. Verify that the MDT deployments that share Windows PowerShell drives are
restored properly using the Get-PSDrive cmdlet, as follows:
Get-PSDrive -PSProvider Microsoft.BDD.PSSnapIn\MDTProvider
An .iso file in the media_folder folder (where media_folder is the name of the
folder that you specified for the media)
Selecting the Generate a Lite Touch bootable ISO image check box on
the General tab of the media Properties dialog box (Clear this check box
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
to reduce the time needed to generate the media unless you need to
create bootable DVDs or start virtual machines [VMs] from the .iso file.)
3. Verify that the MDT deployments that share Windows PowerShell drives are
restored properly using the Get-PSDrive cmdlet, as follows:
Get-PSDrive -PSProvider Microsoft.BDD.PSSnapIn\MDTProvider
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
21
packages, and task sequences. These items can managed using cmdlets
from Windows PowerShell and those provided with MDT.
For more information about manipulating items directly using Windows
PowerShell cmdlets, see Manipulating Items Directly. The folder structure
for a deployment share can also be managed using Windows PowerShell.
For more information, see Managing Deployment Share Folders Using
Windows PowerShell.
Description
Import-MDTApplication
Import-MDTDriver
Import-MDTOperatingSystem
Import-MDTPackage
Import-MDTTaskSequence
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
3. Verify that the MDT deployments that share Windows PowerShell drives are
restored properly using the Get-PSDrive cmdlet, as shown in the following
example:
Get-PSDrive -PSProvider Microsoft.BDD.PSSnapIn\MDTProvider
microsoft.com/technet/SolutionAccelerators
Guide Title
23
Tip You could have also used the dir command to view the list of operating systems instead
of the Get-Item cmdlet.
5. View the properties of one of the items listed in the previous step using the
Get-ItemProperty cmdlet, as shown in the following example:
Get-ItemProperty -Path "DS002:\Operating Systems\Windows 8 in Windows
8 x64 install.wim"
In this example, the value of the Path parameter is the fully qualified
Windows PowerShell path to the item, including the file name that was
returned in the previous step. You could use the same process to view
the properties of other types of items, such as device drivers or
applications.
3. Verify that the MDT deployments that share Windows PowerShell drives are
restored properly using the Get-PSDrive cmdlet, as shown in the following
example:
Get-PSDrive -PSProvider Microsoft.BDD.PSSnapIn\MDTProvider
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
5. Remove one of the items listed in the previous step using the Remove-Item
cmdlet, as shown in the following example:
Remove-Item -Path "DS002:\Operating Systems\Windows 8 in Windows 8
x64 install.wim"
In this example, the value of the Path parameter is the fully qualified
Windows PowerShell path to the item, including the file name that was
returned in the previous step.
You could use the same process to remove other types of items, such
as device drivers or applications.
Note Removing an item that a task sequence uses causes the task sequence to fail. Ensure
that an item is not referenced by other items in the deployment share prior to removing the
item.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
25
these examples, the organizations need the ability to create and populate
deployment shares that are configured consistently.
One method for managing multiple items would be to use a commaseparated values (CSV) file that contains a list of all the items you want to
manage in a deployment share using the Import-CSV cmdlet.
The following is an excerpt of a Windows PowerShell script to import a list
of applications based on information in a .csv file using the Import-CSV,
ForEach-Object, and Import-MDTApplication cmdlets:
$List=Import-CSV "C:\MDT\Import-MDT-Apps.csv"
ForEach-Object ($App in $List) {
Import-MDTApplication path $App.ApplicationFolder -enable "True" Name
$App.DescriptiveName ShortName $App.Shortname Version
$App.Version Publisher $App.Publisher Language $App.Language
CommandLine $App.CommandLine WorkingDirectory
$App.WorkingDirectory ApplicationSourcePath $App.SourceFolder
DestinationFolder $App.DestinationFolder Verbose
}
For more information about how to create a .csv file for use with the
Import-CSV cmdlet, see Using the Import-Csv Cmdlet.
2. Create a Windows PowerShell script file that will be used to automate the
population of the deployment share.
microsoft.com/technet/SolutionAccelerators
4. Add the Import-CSV cmdlet line for one of the .csv files created in step 1.
For more information on the Import-CSV cmdlet, see Using the ImportCsv Cmdlet.
5. Create a ForEach-Object cmdlet loop that processes each item from the .csv
file referenced in the Import-CSV cmdlet in the previous step.
For more information on the MDT cmdlets used for importing items into
a deployment share, see Import an Item into a Deployment Share.
3. View the list of MDT deployments that share Windows PowerShell drives, one
for each deployment share, using the Get-PSDrive cmdlet as follows:
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
27
The Windows_8 folder and any other existing folders in the Operating
Systems folder is displayed.
6. Create a folder named Windows_7 folder in the Operating Systems folder in a
deployment share using the New-Item cmdlet, as shown in the following
example and described in Using the New-Item Cmdlet:
New-Item "DS002:\Operating Systems\Windows_7" -Type directory
The Windows_7 folder and any other existing folders in the Operating
Systems folder is displayed.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
3. View the list of MDT deployments that share Windows PowerShell drives, one
for each deployment share, using the Get-PSDrive cmdlet as follows:
Get-PSDrive -PSProvider Microsoft.BDD.PSSnapIn\MDTProvider
microsoft.com/technet/SolutionAccelerators
Guide Title
29
Restore-MDTPersistentDrive -Verbose
Note If the MDT deployments that share Windows PowerShell drives are already restored,
you will receive a warning message indicating that the cmdlet is unable to restore the drive.
3. View the list of MDT deployments share Windows PowerShell drives, one for
each deployment share, using the Get-PSDrive cmdlet as follows:
Get-PSDrive -PSProvider Microsoft.BDD.PSSnapIn\MDTProvider
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Copying updated source content that already contains the service pack (for
example, Windows 7 with SP1 media) to the folder in the deployment share in
which the existing operating system resides, as described in Automating the
Application of Operating System Service Packs from Updated Source Media
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
31
Note If the MDT deployments that share Windows PowerShell drives are already restored,
you will receive a warning message indicating that the cmdlet is unable to restore the drive.
3. View the list of MDT deployments share Windows PowerShell drives, one for
each deployment share, using the Get-PSDrive cmdlet, as shown in the
following example:
Get-PSDrive -PSProvider Microsoft.BDD.PSSnapIn\MDTProvider
In this example, the operating system source files are on drive E, and
DS002: is the name of a Windows PowerShell drive returned in step 3.
6. Update any MDT deployment media based on deployment share using
Update-MDTMedia cmdlet.
For more information about how to update MDT deployment media based
on deployment share using Update-MDTMedia cmdlet, see Updating
Deployment Media Using Windows PowerShell.
microsoft.com/technet/SolutionAccelerators
For this method, deploy the operating system without the service pack to
a reference computer. Then, apply the service pack to the reference
computer. Next, capture an operating system image of the reference
computer. Finally, copy the captured .wim file over the Install.wim file in
the operating system in the deployment share using Windows PowerShell.
To automate the application of operating system service packs from
updates source media using Windows PowerShell
1. Deploy the target operating system to a reference computer.
For more information on how to install the service pack, see the
documentation accompanying the service pack.
3. Capture an image of the reference computer by creating and deploying a task
sequence based on the Sysprep and Capture task sequence template.
6. View the list of MDT deployments share Windows PowerShell drives, one for
each deployment share, using the Get-PSDrive cmdlet, as shown in the
following example:
Get-PSDrive -PSProvider Microsoft.BDD.PSSnapIn\MDTProvider
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
33
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
3. Define a subsection for each chassis type to detect (Subsection=Laptop%IsLaptop%, Subsection=Desktop-%IsDesktop%, Subsection=Server%IsServer% in the example in Listing 1).
4. Create a subsection for each True and False state of each subsection defined
in step 3 (such as [Laptop-True], [Laptop-False], [Desktop-True], [DesktopFalse] in the example in Listing 1.
5. Under each True and False subsection, add the appropriate settings based on
the chassis type.
microsoft.com/technet/SolutionAccelerators
Guide Title
35
[Desktop-False]
.
.
.
[Server-True]
.
.
.
[Server-False]
.
.
.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
2. Populate the table with data that associates the appropriate package with the
application listed in Program and Features or Add or Remove Programs (as
illustrated in Listing 2).
Listing 2. SQL Query to Populate the Table
use [MDTDB]
go
INSERT INTO [PackageMapping] (ARPName, Packages) VALUES('Office12.0',
'XXX0000F:Install Office 2010 Professional Plus')
go
In Listing 2, the inserted row connects any computer that has the entry
Office12.0 with the Microsoft Office 2010 Professional Plus package.
This means that Microsoft Office 2010 Professional Plus will be
installed on any computer currently running the 2007 Microsoft Office
system (Office 12.0). Add similar entries for any other packages. Any
item for which there is no entry is ignored (no package will be
installed).
3. Create a stored procedure to simplify joining the information in the new table
with the inventory data (as illustrated in Listing 3).
Listing 3. SQL Query to Create a Stored Procedure to Simplify Joining the
Information with Inventory Data
use [MDTDB]
go
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].
[RetrievePackages]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[RetrievePackages]
go
CREATE PROCEDURE [dbo].[RetrievePackages]
@MacAddress CHAR(17)
AS
SET NOCOUNT ON
/* Select and return all the appropriate records based on current inventory
*/
SELECT * FROM PackageMapping
WHERE ARPName IN
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
37
(
SELECT ProdID0 FROM CM_DB.dbo.v_GS_ADD_REMOVE_PROGRAMS a,
CM_DB.dbo.v_GS_NETWORK_ADAPTER n
WHERE a.ResourceID = n.ResourceID AND
MACAddress0 = @MacAddress
)
go
microsoft.com/technet/SolutionAccelerators
SQLServer=SERVER1
Database=MDTDB
StoredProcedure=RetrievePackages
Parameters=MacAddress
SQLShare=Logs
Instance=SQLEnterprise2005
Port=1433
Netlib=DBNMPNTW
The actual value of the MACAddress custom key will be substituted for
the corresponding ? in Listing 7. This query returns a record set with the
rows entered in step 2.
A variable number of arguments cannot be passed to a stored procedure.
As a result, when a computer has more than one MAC address, not all
MAC addresses can be passed to the stored procedure. As an alternative,
replace the stored procedure with a view that allows querying the view
with a SELECT statement with an IN clause to pass all the MAC address
values.
Based on the scenario presented here, if the current computer has the
value Office12.0 inserted into the table (step 2), the one row is returned
(XXX0000F:Install Office 2010 Professional Plus). This indicates that package
XXX0000F:Install Office 2001 Professional Plus will be installed by the
ZTI process during the State Restore Phase.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
39
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
41
SkipAdminPassword
SkipApplications
SkipBDDWelcome
SkipBitLocker
SkipBitLockerDetails
SkipTaskSequence
SkipCapture
SkipComputerBackup
SkipComputerName
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
SkipDomainMembership
SkipFinalSummary
SkipLocaleSelection
SkipPackageDisplay
SkipProductKey
SkipSummary
SkipTimeZone
SkipUserData
microsoft.com/technet/SolutionAccelerators
Guide Title
43
SkipCapture=YES
SkipAdminPassword=YES
SkipProductKey=YES
DeploymentType=REFRESH
SkipDomainMembership=YES
JoinDomain=DomainName
DomainAdmin=Administrator
DomainAdminDomain=DomainName
DomainAdminPassword=a_secure_password
SkipUserData=yes
UserDataLocation=AUTO
UDShare=\\Servername\Sharename\Directory
UDDir=%ComputerName%
SkipComputerBackup=YES
ComputerBackuplocation=AUTO
BackupShare=\\Servername\Backupsharename
BackupDir=%ComputerName%
SkipTaskSequence=YES
TaskSequenceID=Enterprise
SkipComputerName=YES
OSDComputerName=%ComputerName%
SkipPackageDisplay=YES
LanguagePacks001={3af4e3ce-8122-41a2-9cf9-892145521660}
LanguagePacks002={84fc70d4-db4b-40dc-a660-d546a50bf226}
SkipLocaleSelection=YES
UILanguage=en-US
UserLocale=en-CA
KeyboardLocale=0409:00000409
SkipTimeZone=YES
TimeZoneName=China Standard Time
SkipApplications=YES
Applications001={a26c6358-8db9-4615-90ff-d4511dc2feff}
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Applications002={7e9d10a0-42ef-4a0a-9ee2-90eb2f4e4b98}
UserID=Administrator
UserDomain=DomainName
UserPassword=P@ssw0rd
SkipBitLocker=YES
SkipSummary=YES
Powerusers001=DomainName\Username
SkipCapture=YES
ComputerBackupLocation=\\WDG-MDT-01\Backup$\
BackupFile=MyCustomImage.wim
SkipAdminPassword=YES
SkipProductKey=YES
SkipDomainMembership=YES
JoinDomain=WOODGROVEBANK
DomainAdmin=Administrator
DomainAdminDomain=WOODGROVEBANK
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
45
DomainAdminPassword=P@ssw0rd
SkipUserData=Yes
UserDataLocation=\\WDG-MDT-01\UserData$\Directory\usmtdata
SkipTaskSequence=YES
TaskSequenceID=Enterprise
SkipComputerName=YES
OSDComputerName=%SerialNumber%
SkipPackageDisplay=YES
LanguagePacks001={3af4e3ce-8122-41a2-9cf9-892145521660}
LanguagePacks002={84fc70d4-db4b-40dc-a660-d546a50bf226}
SkipLocaleSelection=YES
UILanguage=en-US
UserLocale=en-CA
KeyboardLocale=0409:00000409
SkipTimeZone=YES
TimeZoneName=China Standard Time
SkipApplications=YES
Applications001={a26c6358-8db9-4615-90ff-d4511dc2feff}
Applications002={7e9d10a0-42ef-4a0a-9ee2-90eb2f4e4b98}
SkipBitLocker=YES
SkipSummary=YES
Powerusers001=WOODGROVEBANK\PilarA
CaptureGroups=YES
SLShare=\\WDG-MDT-01\UserData$\Logs
Home_page=http://www.microsoft.com/NewComputer
microsoft.com/technet/SolutionAccelerators
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
47
There are a few minor complications to watch for when running a web
service:
A POST request to the web service is recommended, so the web service call
must be able to support a POST.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Using the ZTIConnect.wsf script, you can connect to other servers and
access resources on them. The syntax for the ZTIConnect.wsf script is as
follows (where unc_path is a Universal Naming Convention [UNC] path to
connect to the server):
Cscript.exe %SCRIPTROOT%\ZTIConnect.wsf /uncpath:unc_path
6. Complete the Properties tab of the new task using the information listed in
Table 3 (accept default values if none are specified), and then click Apply.
Table 3. Completing the Properties Tab of the New Task
In this box
Do this
Name
Description
Command
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
In this box
49
Do this
folder on the server).
7. Complete the Options tab of the new task using the information listed in
Table 4 (accept default values if none are specified), and then click OK.
Table 4. Completing the Options Tab of the New Task
In this box
Do this
Success codes
After adding the task that will run the ZTIConnect.wsf script, subsequent
tasks can access network resources on the server specified in the
/uncpath option of the ZTIConnect.wsf script.
microsoft.com/technet/SolutionAccelerators
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
51
Function SetModelAlias()
If Instr(oEnvironment.Item("Model"), "(") <> 0 Then
SetModelAlias = Left(oEnvironment.Item("Model"), _
Instr(oEnvironment.Item("Model"), _
"(") - 1)
oLogging.CreateEntry "USEREXIT " & _
"ModelAlias has been set to " & SetModelAlias, _
LogTypeInfo
Else
SetModelAlias = oEnvironment.Item("Model")
oLogging.CreateEntry " USEREXIT - " & _
"ModelAlias has not been changed.", LogTypeInfo
End if
End Function
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Create the R2comp.inf file, and add it the Windows Server 2003 R2
installation files (Windows Server 2003 R2 Disc 2) to the operating system
source.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
53
To create the R2comp.inf file and add the Windows Server 2003 R2
installation files (Disc 2) to the operating system source
1. In Windows Explorer, go to the operating system source files that you
imported in the previous section. The image will be located in
drive:\deployment_share\Operating Systems\operating_system_name (where
deployment_share is the name of the folder that contains the deployment
share to configure and operating_system_name is the name of the folder
created in step 8 of the previous section); for example, D:\Production
Deployment Share\Operating Systems\Windows-Server-2003 Standard
Edition.
2. In the operating system source folder, create the folder $OEM$. For example,
the following folders should exist:
6. Copy the contents of the Cmpnents folder from Disc 2 to the folder created in
step 3for example, D:\Production Deployment Share\Operating
Systems\Windows-Server-2003 Standard Edition\$OEM$\$1\R2\Cmpnents.
7. Create a task sequence that includes this operating system source.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Add the Windows Server 2003 R2 installation files (Windows Server 2003 R2
Disc 2) to the operating system source.
Create a batch file that runs the R2 component installation the first time a
user logs into the operating system.
microsoft.com/technet/SolutionAccelerators
Guide Title
55
When completed, the InstallR2.cmd file should contain three lines. The
first two lines begin with reg, and the last line begins with C:\R2.
2. Create a task sequence to deploy the operating system, and modify the
[GUIRunOnce] section in the Unattend.txt file for the task sequence as
follows:
[GUIRunOnce]
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
"C:\R2\InstallR2.cmd"
"cscript.exe C:\MININT\Scripts\LiteTouch.wsf /start"
"cscript.exe D:\MININT\Scripts\LiteTouch.wsf /start"
"cscript.exe E:\MININT\Scripts\LiteTouch.wsf /start"
"cscript.exe F:\MININT\Scripts\LiteTouch.wsf /start"
To provide customers with the ability to increase the lifespan for both
Windows XP and Windows Server 2003, the following deployment
scenarios are provided.
microsoft.com/technet/SolutionAccelerators
Guide Title
57
2. Ensure that the TxtSetup.oem file exists in the same directory as the rest of
the driver package.
Note All mass storage drivers must have valid TxtSetup.oem files in the same directory as
the .inf file (manual edits to fix path issues in the TxtSetup.oem file are supported).
3. Import the driver into MDT using the existing Deployment Workbench.
Note Many drivers cannot be accurately inventoried by existing MDT routines. If importing a
32-bit (x86) driver, remove references to 64 bit (x64) in the
deployment_share\control\drivers.xml file (where deployment_share is the path to the folder
that contains the deployment share to configure); if importing an x64 driver, remove references
to x86 in this file.
Additional Considerations
For a full explanation of the steps that MDT performs, see the Microsoft
Support article, HOW TO: Create an Unattended Installation of Third-Party
Mass Storage Drivers in Windows Server 2003.
Files referenced in the TxtSetup.oem file that do not have the extensions
.sys, .cat, or .inf are automatically copied to \$OEM$\$$\OEMDIR before
calling Windows Setup (Winnt.exe), and then they are placed in the %WinDir
%\System32 directory when the process is complete.
MDT only injects drivers that have been imported into the Deployment
Workbench.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
MDT injects only drivers that have matching devices on the local computer.
If there is more than one matching driver for a computer, MDT injects both
drivers on the local system. Unless identical, the *.sys, *.inf, and *.cat files
must have globally unique file names (no other file with the same name can
exist in any other package installed on the computer). The display name
listed in the [scsi] section of TxtSetup.oem must be globally unique across
each TxtSetup.oem file. A warning dialog box is displayed if duplicates are
found.
If driver packages conflict with other driver packages, typically the best thing
to do is to identify the primary driver package, add it to a driver group, and
add the group name to the StorageDriverGroup list item. Other storage
drivers, not represented by groups defined in StorageDriverGroup, will not
be installed.
StorageDriverGroup001 = AccountingStorageDriverGroup
StorageDriverGroup002 = SalesStorageDriverGroup
microsoft.com/technet/SolutionAccelerators
Guide Title
59
3. Run Sysprep to process all the drivers, which places them in the critical
device database.
4. Capture the image.
This list item contains a list all driver storage groups to be included in
Sysprep:
StorageDriverSysPrepGroup001 = AccountingStorageGroup
StorageDriverSysPrepGroup002 = SalesStorageGroup
Note Only storage drivers contained in these groups will be deployed to the Sysprep image.
The captured image should contain the storage drivers specified in the
StorageDriverSysPrepGroup list item.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Additional Considerations
A driver package could have more Plug and Play IDs enumerated by the
system than are actually needed by Sysprep for driver preparation. This
process uses only the subset of Plug and Play IDs present in the
TxtSetup.oem file to populate the necessary Sysprep.inf sections, ensuring
that only the Sysprep.inf file for devices that are actually supported by their
respective manufacturers is populated.
Any MDT task sequence that deploys an operating system includes the Inject
Drivers task sequence step.
microsoft.com/technet/SolutionAccelerators
Guide Title
61
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
A task sequence to collect the user state migration information from the
existing computer; create the task sequence by importing a Client Replace
Task Sequence task sequence template.
A task sequence to deploy the operating system and restore the collected
user state migration information; create the task sequence by importing a
Client Task Sequence task sequence template.
A package that has the Windows User State Migration Tool (USMT) is already
available in Configuration Manager 2007 R3. In this sample, this package will
be called USMT.
microsoft.com/technet/SolutionAccelerators
Guide Title
63
On this wizard
page
Do this
Choose Template
General
Boot Image
MDT Package
USMT Package
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
On this wizard
page
Do this
3. Click Next.
Settings Package
microsoft.com/technet/SolutionAccelerators
Guide Title
65
An MDT Custom Settings package for the new computer is already available
in Configuration Manager 2007 R3. In this sample, this package will be called
CUSTOMSETTINGS_NEW.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
On this wizard
page
Do this
Choose Template
General
Boot Image
MDT Package
Solution Accelerators
Guide Title
On this wizard
page
67
Do this
click Browse.
2. In the Select a Package dialog box, click
MDT2010, and then click OK.
3. Click Next.
USMT Package
Settings Package
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
4. Click Start, and then point to All Programs. Point to Microsoft System
Center, point to Configuration Manager 2007, and then click ConfigMgr
Console.
5. In the Configuration Manager console, go to Site Database/Computer
Management/Software Distribution/Packages.
6. In the preview pane, click CUSTOMSETTINGS_NEW.
7. In the Actions pane, click Update Distribution Points.
8. In the Confirm Update Distribution Points dialog box, click Yes.
microsoft.com/technet/SolutionAccelerators
Guide Title
69
A registry setting
microsoft.com/technet/SolutionAccelerators
On the Options tab of the task sequence step, perform the following
actions:
Add. Click this button to add a condition to the task sequence step.
Edit. Click this button to modify an existing condition in a task sequence step.
IF Statements in Conditions
All task sequence conditions include one or more IF statements. IF
statements are the foundation for creating conditional task sequence
steps. A task sequence step condition can include only one IF statement,
but multiple IF statements can be nested beneath the top-level IF
statement to create more complex conditions.
An IF statement can be based on the conditions listed in Table 7, which
are configured in the IF Statement Properties dialog box.
Table 7. Conditions Available in IF Statements
Condition
All conditions
Any conditions
None
Complete the condition for running the task sequence step by adding
other criteria to the conditions (for example, task sequence variables or
values in a registry setting).
To add an IF statement condition to a task sequence step
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
71
1. On the step Option tab (where step is the name of the task sequence step to
configure), click Add, and then click If statement.
2. In the If Statement Properties dialog box, click condition (where condition
is one of the conditions listed in Table 7), and then click OK.
microsoft.com/technet/SolutionAccelerators
1. In the Task Sequence Editor, click the Capture Network Settings task.
2. Click Add Condition, and then click Operating System Version.
3. In the Architecture box, click the relevant server. For this example, click x86.
4. In the Operating system box, click the operating system and version for
which to set a condition. For this example, click x86 Windows 2003.
5. In the Condition box, click the relevant condition, and then click OK.
microsoft.com/technet/SolutionAccelerators
Guide Title
73
8. In this case, clear the Check the timestamp check box, and then click OK.
microsoft.com/technet/SolutionAccelerators
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
75
Complex Conditions
Multiple conditions can be grouped using IF statements to create complex
conditions. For instance, imagine that a particular step should only be
executed for Contoso 1950 computers running Windows Server 2003 or
Windows Server 2008. Written as a programmatic IF statement, it would
look similar to the following:
IF ((Computer Model IS Contoso 1950) AND (operating system=2003 OR
operating system=2008))
microsoft.com/technet/SolutionAccelerators
2. Click the task sequence step to which to add the condition, and then click the
Options tab.
3. Click Add condition, click If Statement, and then click All conditions. Click
OK.
4. Click the condition statement, click Add condition, and then click WMI
Query.
5. Ensure root\cimv2 is specified as the WMI namespace, and then, in the
WQL Query box, type SELECT * FROM Win32_ComputerSystem WHERE
ComputerModel LIKE %Contoso%1950%. Click OK.
6. Click the IF statement, and then click Add condition. Click If statement, and
then click Any condition. Click OK.
7. Click the second IF statement. Click Add condition, and then click
Operating System Version.
8. In the Architecture box, click the architecture for the servers. For this
example, click x86.
9. In the Operating system box, click the operating system and version. For
this example, click x86 Windows 2003 original release. Click OK.
10. Click the second IF statement. Click Add condition, and then click
Operating System Version.
11. In the Architecture box, click the architecture for the servers. For this
example, click x86.
12. In the Operating system box, click the operating system and version. For
this example, click x86 Windows 2008 original release. Click OK.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
77
Purpose/comment
MDT
DFS-R components
Windows Deployment
Services
microsoft.com/technet/SolutionAccelerators
Required component
Purpose/comment
DFS-R components
Windows Deployment
Services
Note Windows Deployment Services must be set up and configured on each child server, but it is
not necessary to add boot or installation images.
Note Ensure that the LiteTouchPE_x86.wim file created when the deployment share is updated
has been added to Windows Deployment Services.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
79
In the Name for replication group box, type a name for the replication
groupfor example, MDT 2010 Replication Group.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Ensure that the Domain box contains the correct domain name.
7. Click Next.
8. On the Replication Group Members page, perform these steps:
a. Click Add.
b. Type the names of all servers that are to be members of this replication
groupfor example, all child deployment servers and the master
deployment server.
c. Click OK.
9. Click Next.
10. On the Topology Selection page, click Hub and Spoke, and then click
Next.
11. On the Hub Members page, click the master deployment server, and then
click Add.
12. Click Next.
13. On the Hub and Spoke Connections page, ensure that for each child
deployment server the master deployment server listed is the Required Hub
Member.
14. Click Next.
15. On the Replication Group Schedule and Bandwidth page, specify a
schedule for replicating the content between servers.
16. Click Next.
17. On the Primary Member page, in the Primary Member box, click the master
deployment server.
18. Click Next.
19. On the Folders to Replicate page, click Add, and then perform these steps:
a. In the Local Path of the folder to replicate box, click Browse to go to
the X:\Deployment folder (where X is the drive letter on the deployment
server).
b. Click Use name based on path.
c. Click OK.
d. Click Add.
e. In the Add Folder to Replicate dialog box, click Browse to go to the
X:\RemoteInstall\Boot folder.
f.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
81
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
2. Ensure that the SQL Server Browser service is enabled and set to Automatic.
3. In the SQL Server Surface Area Configuration box, click Local and
Remote connections.
This terminology is used through the SQL Server replication setup and
configuration wizards.
microsoft.com/technet/SolutionAccelerators
Guide Title
83
microsoft.com/technet/SolutionAccelerators
9. Click Next.
10. On the Agent Security page, click the account under which the snapshot
agent will run, and then click Next.
11. On the Wizard Actions page, click Create the publication, and then click
Next.
12. On the Complete the Wizard page, in the publication name box, type a
descriptive publication name.
13. Click Finish to complete the wizard, and then click Close when the wizard
has created the publication.
Note The publication will now be visible beneath the Local Publications node in SQL Server
Management Studio.
microsoft.com/technet/SolutionAccelerators
Guide Title
85
a. Click Add Subscriber, and then click Add SQL Server Subscriber.
b. Add each child deployment server.
c. For each child deployment server added, in the Subscription Database
box, click the empty MDT DB on that child deployment server.
Note If the empty MDT DB has not yet been created, in the Subscription Database box,
select the option to create a new database.
Note This database must be given the same name as the MDT DB on the master
deployment server. For example, if the MDT DB on the master deployment server is called
MDTDB, create an empty database called MDTDB on the child deployment server.
7. Click Next.
8. On the Distribution Agent Security page, click to open the Distribution
Agent Security dialog box.
9. Type the details of the account to use for the distribution agent, and then click
Next.
10. On the Synchronization Schedule page, perform these steps:
a. In the Agent Schedule box, click <Define schedule>.
b. Specify the schedule that should be used to replicate the database
between master and child deployment servers, and then click Next.
11. On the Initialize Subscription page, click Next.
12. On the Wizard Actions page, click Create the subscription(s), and then
click Next.
13. Click Finish, and then click Close when the wizard has successfully finished.
Configure CustomSettings.ini
The LTI deployment infrastructure has now been successfully created,
and each location will contain an LTI deployment server, with a replicated
copy of:
The MDT DB
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Now, you can configure the CustomSettings.ini file for the deployment
share to use the deployment content (deployment share and database)
from its local deployment server, the server that delivers the
LiteTouchPE_x86.wim environment through Windows Deployment
Services.
When the LiteTouchPE_x86.wim file is delivered from Windows
Deployment Services, a registry key is configured with the name of the
Windows Deployment Services server you are using. MDT captures this
server name in a variable (%WDSServer%) that you can use to configure
CustomSettings.ini.
To always use the local LTI deployment server
Note The following procedure assumes that the deployment share has been created and set as
the Deployment$ share.
1. Click Start, and then point to All Programs. Point to Microsoft Deployment
Toolkit, and then click Deployment Workbench.
2. In the Deployment Workbench console tree, go to Deployment
Workbench/Deployment Shares/deployment_share (where
deployment_share is the name of the deployment share to configure).
3. In the Actions pane, click Properties.
4. Click the Rules tab, and then modify the CustomSettings.ini file to configure
the following properties:
For each SQL Server section added, configure SQLServer to use the
server name %WDSServer%for example, SQLServer=%WDSServer
%.
microsoft.com/technet/SolutionAccelerators
Guide Title
87
microsoft.com/technet/SolutionAccelerators
[CApps]
SQLServer=%WDSServer%
Database=MDTDB
Netlib=DBNMPNTW
SQLShare=
Table=ComputerApplications
Parameters=UUID, AssetTag, SerialNumber, MacAddress
ParameterCondition=OR
Order=Sequence
[CAdmins]
SQLServer=%WDSServer%
Database=MDTDB
Netlib=DBNMPNTW
SQLShare=
Table=ComputerAdministrators
Parameters=UUID, AssetTag, SerialNumber, MacAddress
ParameterCondition=OR
[CRoles]
SQLServer=%WDSServer%
Database=MDTDB
Netlib=DBNMPNTW
SQLShare=
Table=ComputerRoles
Parameters=UUID, AssetTag, SerialNumber, MacAddress
ParameterCondition=OR
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
89
Understanding LocationServer.xml
First, you must understand How MDT uses LocationServer.xml. During
LTI, MDT scripts read and process the BootStrap.ini file to gather initial
information about the deployment. This happens before a connection has
been made to the deployment server. Therefore, the DeployRoot
property is commonly used to specify in the BootStrap.ini file the
deployment server to which it should make a connection.
If the BootStrap.ini file does not contain a DeployRoot property, MDT
scripts load a wizard page to prompt the user for a path to the deployment
server. While initializing the HTML Application (HTA) wizard page, MDT
scripts check for the existence of the LocationServer.xml file and, if it
exists, use LocationServer.xml to display available deployment servers.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Details
%WDSServer%
This method is used when the MDT server is cohosted on the Windows Deployment Services
server.
When an LTI deployment is initiated from
Windows Deployment Services, an environmental
variable%WDSServer%is created and
populated with the name of the Windows
Deployment Services server.
The DeployRoot variable can use this variable to
automatically connect to a deployment share on
the Windows Deployment Services serverfor
example:
DeployRoot=\\%WDSServer%\Deployment$
Location-based
automation
Each approach listed in Table 10 offers one way to automate the selection
of the deployment server at a given location for certain scenarios. These
approaches are targeted to specific scenariosfor example, when the
MDT server is co-hosted with Windows Deployment Services.
There are other scenarios in which these approaches are not suitablefor
example, if there are multiple deployment servers at a given location or
automation logic is not possible (for example, the network is not
segmented enough to allow location determination or the MDT server is
separated from Windows Deployment Services).
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
91
A unique identifier
A location name, used to present an easily identifiable name for that location
microsoft.com/technet/SolutionAccelerators
<server>
<serverid>2</serverid>
<friendlyname>
Contoso NYC, New York, USA
</friendlyname>
<UNCPath>\\NYCDS01\Deployment$</UNCPath>
</server>
</servers>
Using this format, specify different server entries for each location (as
shown in Listing 16) or for situations in which there are multiple servers
within a single location by specifying a different server entry for each
server at that location, as shown in Listing 17.
Listing 17. Example LocationServer.xml File to Support Multiple
Servers at Multiple Locations
<?xml version="1.0" encoding="utf-8" ?>
<servers>
<QueryDefault></QueryDefault>
<server>
<serverid>1</serverid>
<friendlyname>
Contoso HQ DS1, Seattle, USA
</friendlyname>
<UNCPath>\\STLDS01\Deployment$</UNCPath>
</server>
<server>
<serverid>2</serverid>
<friendlyname>
Contoso HQ DS2, Seattle, USA
</friendlyname>
<UNCPath>\\STLDS02\Deployment$</UNCPath>
</server>
</servers>
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
93
Specify the weighting metric by using the <server weight> tag, which MDT
uses in the server-selection process. The likelihood of a server being
selected is calculated by:
Server weight/sum of all server weights
In Listing 18, the three servers at Contoso HQ are listed as 1, 2, and 4.
The likelihood of a server with a weighting of 2 being selected becomes 2
in 7. Therefore, to use the weighting system, determine the capacity of the
servers available at a location, and weight each server by the servers
capacity in relation to each of the other servers.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
95
microsoft.com/technet/SolutionAccelerators
4. On the Options page, select the desired options for updating the deployment
share, and then click Next.
5. On the Summary page, verify the details are correct, and then click Next.
6. On the Confirmation page, click Finish.
Note When the update process has finished, add the new LiteTouch_x86 and LiteTouch_x64
Windows PE environments back into Windows Deployment Services, or burn them to boot media
to use during deployment.
MDT has been installed on the deployment server (WDG MDT 01)
The deployment share has already been created and populated, including
operating system images, applications, and device drivers
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
97
A deployment share should exist prior to beginning this sample. For more
information about creating a deployment share, see the section,
"Managing Deployment Shares in the Deployment Workbench", in the
MDT document Using the Microsoft Deployment Toolkit.
On this wizard
page
Do this
General Settings
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
On this wizard
page
Do this
Replace Computer Scenario on
Existing Computer.
3. Click Next.
Select Template
Summary
Confirmation
Click Finish.
The New Task Sequence Wizard finishes, and the VISTA_EXIST task
sequence is added to the list of task sequences.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
99
4. Complete the New Task Sequence Wizard by using the information in Table
12. Accept the default values unless otherwise specified.
Table 12. Information for Completing the New Task Sequence Wizard
On this wizard
page
Do this
General Settings
Select Template
Select OS
Specify Product
Key
OS Settings
Admin Password
Confirmation
Click Finish.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
The New Task Sequence Wizard finishes, and the VISTA_NEW task
sequence is added to the list of task sequences.
microsoft.com/technet/SolutionAccelerators
Guide Title
101
SkipCapture=NO
SkipAdminPassword=YES
SkipProductKey=YES
microsoft.com/technet/SolutionAccelerators
1. Click Start, and then point to All Programs. Point to Microsoft Deployment
Toolkit, and then click Deployment Workbench.
2. In the Deployment Workbench console tree, go to Deployment
Workbench/Deployment Shares/deployment_share (where
deployment_share is the name of the deployment share to configure).
3. In the Actions pane, click Update Deployment Share.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
103
If the reference computer is a VM, start the VM directly from the ISO file
or from a CD or DVD of the ISO file.
On this wizard
page
Do this
Welcome to
Deployment
Specify
Credentials for
connecting to
network shares.
Select a task
sequence to
execute on this
computer.
Specify where to
Click Next.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
On this wizard
page
Do this
Ready to begin
Click Begin.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
105
On this wizard
page
Do this
Welcome to
Deployment
Specify
Credentials for
connecting to
network shares.
Select a task
sequence to
execute on this
computer.
Configure the
computer name
Click Next.
Specify whether to
restore user data
Locale Selection
Click Next.
Click Next.
Specify whether to
capture an image
Specify the
BitLocker
configuration
Ready to begin
Click Begin.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Windows Vista is now installed on the new computer and the captured
user state migration information is also restored.
microsoft.com/technet/SolutionAccelerators
Guide Title
107
When referenced from a custom script, the ZTIUtility script initializes the
MDT environment and setup classes. These classes are available:
Logging. This class provides the logging functionality that all MDT scripts
use. It also creates a single log file for each script run during deployment and
a consolidated log file of all scripts. These log files are created in a format
designed to be read by TRACE32; this tool is available in the System Center
Configuration Manager 2007 Toolkit V2.
Utility. This class provides general utilities that are used throughout ZTI and
LTI scripts. Microsoft recommends that any time custom code is developed
this class should be examined to see if any code can simply be reused.
Additional information about some of the functionality provided in this class is
included later in this section.
Strings. This class performs common string processing routines like creating
a delimited list of items, displaying a hex value, trimming white space from a
string, right aligning a string, left aligning a string, forcing a value to string
format, forcing a value to array format, generating a random globally unique
identifier (GUID), and Base64 conversions.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
The overall structure of the MDT scripts has also changed. Most MDT
scripts are now encapsulated within VBScript Class objects. The class is
initialized and called with the RunNewInstance function.
Note Most existing MDT 2008 Update 1 scripts will work as-is in MDT, even with the extensive
changes to ZTIUtility.vbs, as most MDT scripts will include ZTIUtility.vbs.
//*******************************************************
//
// Copyright (c) Microsoft Corporation. All rights reserved
// Microsoft Deployment Toolkit Solution Accelerator
// File: ZTI_Example.wsf
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
'
'
'
'
'
'
'
109
//
// Purpose: Example of scripting with the
//
Microsoft Deployment Toolkit.
//
// Usage: cscript ZTI_Example.wsf [/debug:true]
//
//*******************************************************
Option Explicit
RunNewInstance
'//-------------------------------------------------------'// Main Class
'//-------------------------------------------------------Class ZTI_Example
'//-------------------------------------------------------'// Main routine
'//-------------------------------------------------------Function Main()
Dim iRetVal
Dim sScriptPath
iRetVal = SUCCESS
oLogging.CreateEntry "Begin example script", _
LogTypeInfo
' %ServerA% is a generic variable available within
' every CustomSettings.ini file.
sScriptPath = "\\" & oEnvironment.Item("ServerA") & _
"\public\products\Applications\User\Technet\USEnglish"
' Validate a connection to server, net connect with
' credentials if necessary.
iRetVal = oUtility.ValidateConnection( sScriptPath )
TestAndFail iRetVal, 9991, "Validate Connection to [" & _
sScriptPath & "]"
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
111
Function
Output
oUtility.LocalRootPath
oUtility.BootDevice
oUtility.LogPath
oUtility.StatePath
oUtility.ScriptName
oUtility.ScriptDir
oUtility.ComputerNam
e
oUtility.ReadIni(file,
section, item)
oUtility.WriteIni(file,
section, item, value)
oUtility.Sections(file)
oUtility.SectionConten
ts(file, section)
oUtility.RunWithHeartb
eat(sCmd)
oUtility.FindFile
(sFilename,sFoundPat
h)
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Function
Output
oUtility.findMappedDri
ve(sServerUNC)
oUtility.ValidateConne
ction(sServerUNC)
MapNetworkDrive
(sShare, SDomID,
sDomPwd)
VerifyPathExists(strPa
th)
oEnvironment.Substit
ute(sVal)
oEnvironment.Item
(sName)
oEnvironment.Exists
(sName)
oEnvironment.ListItem
(sName)
oLogging.ReportFailur
e
(sMessage, iError)
oLogging.CreateEvent
(iEventID, iType,
sMessage, arrParms)
oLogging.CreateEntry
(sLogMsg, iType)
TestAndFail(iRc,
iError, sMessage)
TestAndLog(iRc ,
sMessage)
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
113
The custom deployment code script name should always begin with the letter
Z.
The custom deployment code should be placed in the Scripts folder on the
deployment sharefor example, D:\Production Deployment Share\Scripts.
The most frequently used methods for integrating custom code that also
ensure consistent logging are:
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
On this wizard
page
Do this
Application Type
Details
Command Details
Summary
Confirmation
Click Finish.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
115
The newly created task sequence step appears in the list of task
sequence steps.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Device drivers that contain an .inf file that can be used to import the device
driver into the Deployment Workbench
Device drivers that are packaged as an application, and that must be installed
as an application
Using MDT, you can handle both types of drivers as part of an operating
system deployment.
Install device drivers by:
As a package that you can extract and that contains .inf files used to import
the driver into the Deployment Workbench
Device driver packages that can be extracted to access .inf files can use
the MDT automatic driver detection and installation process by first
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
117
importing the driver into the Out-of-Box Drivers node in the Deployment
Workbench.
Device driver packages that cannot be extracted to isolate .inf files or
those that do not work correctly without first being installed using an
application installer such as an MSI or Setup.exe file can use the MDT
Install Application feature and install the device driver during the
deployment process just as for any normal application.
6. On the Summary page, verify that the settings are correct, and then click
Next to import the drivers into the Deployment Workbench.
7.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
119
Note Configure whether the application should is visible during deployment on the Properties
dialog box of any application by selecting or clearing the Hide this application in the Deployment
Wizard check box. Repeat this process for each device driver application used during deployment.
After the applications are imported into the Deployment Workbench, add
them to the deployment process using the appropriate logic to ensure that
the application installs only when running on the correct hardware. There
are different methods for achieving this:
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Create a new task sequence group for each hardware model, and then add a
query to run that group of actions if the computer matches a specific
hardware type.
This creates a new task sequence group in the task sequence. Use
this new task sequence group to create the steps for installing the
hardware-specific device driver applications.
7. In the details pane, click New Group.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
121
In the WQL query box, type a WMI Query Language (WQL) query using
the Win32_ComputerSystem class to ensure that the application is
installed only for a specific application typefor example:
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
123
1. In the deployment share of the deployment server, open the Control folder
for example, D:\Production Deployment Share\Control.
2. Locate and open the Applications.xml file.
3. Locate the required application.
4. Locate the application GUID by locating the line enclosed in the application
<guid> tags; for example, <application guid={c303fa6e-3a4d-425e-810277db9310e4d0}>.
As part of the initialization process, both the LTI and ZTI process gather
information about the computer on which it is running. As part of this
process, WMI queries are performed and the values from the
Win32_ComputerSystem class for make and manufacturer are
populated as variables %Make% and %Model%, respectively.
These values can be used during processing the CustomSettings.ini file to
dynamically read sections of the file depending on the make and model
detected. Listing 21 shows an example of the CustomSettings.ini file.
Listing 21. Sample CustomSettings.ini Configured for a HardwareSpecific Application Installation
[Settings]
Priority=Make, Default
Properties=MyCustomProperty
[Default]
OSInstall=Y
[Dell Computer Corporation]
Subsection=Dell-%Model%
[Dell-Latitude D620]
MandatoryApplications001={1D7DF331-47B7-472C-87B3-442597EC2F7D}
[Dell-Latitude D610]
MandatoryApplications001={c303fa6e-3a4d-425e-8102-77db9310e4d0}
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
The System Information tool. Use the System Summary node in this tool to
identify the System Manufacturer (make) and System Model (model).
microsoft.com/technet/SolutionAccelerators
Guide Title
125
Search for the individual computer (using the MAC address, asset tag, or
similar).
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Search for the location of the computer (using the default gateway).
Search for the make and model of the computer (using WMI manufacturer or
make and model queries).
For each database entry you create, you can specify deployment
properties, applications, whether to use Configuration Manager packages,
and administrators. By creating make and model entries in the database,
you can add the required hardware-specific device driver applications.
To create entries in the MDT DB to allow installation of device driver
applications
Note Repeat this process for each hardware make and model that requires a device driver
application.
1. Click Start, and then point to All Programs. Point to Microsoft Deployment
Toolkit, and then click Deployment Workbench.
2.
microsoft.com/technet/SolutionAccelerators
Guide Title
127
Option 3. Use multicasting with MDT and the Windows Server 2008 Windows
Deployment Services server role.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
8. In the Driver Injection section, in the Selection profile list, select the
appropriate driver selection profile.
9. In the Properties dialog box, click OK.
Note This step is not necessary if Windows PE already includes the necessary device
drivers.
microsoft.com/technet/SolutionAccelerators
Guide Title
129
microsoft.com/technet/SolutionAccelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
131
15. Import the updated boot WIM into Windows Deployment Services.
Wdsclientapi.dll
Wdscsl.dll
Wdsimage.dll
Note The Windows source directory being used must match the platform of the operating
system running on the computer where MDT is installed.
2. Click Start, and then point to All Programs. Point to Microsoft Deployment
Toolkit, and then click Deployment Workbench.
3. In the Deployment Workbench console tree, go to Deployment
Workbench/Deployment Shares/deployment_share/Operating Systems
(where deployment_share is the name of the deployment share to configure).
4. In the Actions pane, click Import Operating System.
microsoft.com/technet/SolutionAccelerators
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
133
Note This process applies only to WIM image files and is not used when performing unattended
installations of Windows XP and Windows Server 2003.
The Windows Deployment Services role must be installed from the Server
Management console
As with any deployment using MDT, at least one operating system WIM
image must have been imported, either as a full set of source files or as a
custom image with setup files
Note It is important to use the latest version of Windows AIK for multicasting; the copy of
Windows PE included in earlier versions of Windows AIKfor example, Windows AIK 1.0does
not support downloading from a multicast server.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
After a computer has been deployed, verify that the operating system was
downloaded from a multicast transmission by examining the BDD.log file
in the \Windows\Temp\DeploymentLogs folder.
There will be two entries in the logs folder, both beginning with Multicast
transfer; check them to verify that the transfer was successful. For more
information on multicast transmissions with MDT and Windows
Deployment Services, see the section, "Enable Windows Deployment
Services Multicast Deployment for LTI Deployments", in the MDT
document Using the Microsoft Deployment Toolkit.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
135
microsoft.com/technet/SolutionAccelerators
In the first phase, the configuration files are used during the creation of
the reference computer and are stored in the folder specific to the task
sequence used in that phase. The configuration files used in the third and
last phase of the OEM preload process are stored in the folder that is
specific to the task sequence used in that phase.
When making modifications to the configuration files, ensure that changes
to the configuration file are made that corresponds to the appropriate task
sequence in each OEM preload process phase.
The MDT log files for Phase 1 are stored in the C:\MININT and C:\SMSTSLog
folders.
The MDT log files for Phase 3 are stored in the %WINDIR
%\System32\CCM\Logs folder for x86-based deployments or in the
%WINDIR%\SysWow64\CCM\Logs folder for x64-based deployments.
Use the appropriate folder when diagnosing or troubleshooting MDTrelated deployment problems.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
137
Operating Systems
Applications
Packages
Out-of-Box Drivers
For more information about performing this step, see the section,
"Managing Deployment Shares in the Deployment Workbench", in the
MDT document Using the Microsoft Deployment Toolkit.
2. Create a new task sequence based on the Litetouch OEM Task Sequence
task sequence template in the Deployment Workbench.
For more information about performing this step, see the section,
"Configuring Task Sequences in the Deployment Workbench", in the
MDT document Using the Microsoft Deployment Toolkit.
3. Create one or more task sequences that will be used to deploy the target
operating system on the target computer after deployment in the production
environment.
For more information about performing this step, see the section,
"Configuring Task Sequences in the Deployment Workbench", in the
MDT document Using the Microsoft Deployment Toolkit.
4. Create a selection profile that includes the applications, operating systems,
drivers, packages, and task sequences required for the OEM deployment.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
For more information about performing this step, see the section,
"Manage Selection Profiles", in the MDT document Using the Microsoft
Deployment Toolkit.
5. Create deployment media.
8. Deliver the ISO file or the DVD to the OEM or to the organizations staging
environment.
The task sequence will start and the contents of the bootable media
will be copied to the local hard disk of the target computer.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
139
For more information about completing this step, see the section,
"Running the Deployment Wizard", in the MDT document Using the
Microsoft Deployment Toolkit.
When this phase is complete, the target computer will be ready to use in
the production environment.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Configuring Configuration
Manager 2007 R3 Programs to Allow
Package Installation via Task Sequences
Using the CustomSettings.ini file, MDT DB, Configuration
Manager 2007 R3 collection variables, or Configuration Manager 2007 R3
computer variables, you can specify a list of Configuration Manager
packages for installation on the target computer.
Adding the Install Software task sequence step to a Configuration
Manager 2007 R3 task sequence initiates the installation of Configuration
Manager packages. However, as a security precaution, Configuration
Manager 2007 R3 does not default to allow programs to run via task
sequences. The task sequence will fail unless you select the programs
Allow this program to be installed from the Install Software task
sequence without being advertised check box.
The sample script in Listing 22 enumerates each Configuration
Manager 2007 R3 program, checking to see if the first bit
(AUTHORIZED_DYNAMIC_INSTALL, described briefly in the
Configuration Manager 2007 R3 software development kit) of the
ProgramFlags field is enabled. If not, the script enables it. In most cases,
run this script (using credentials with sufficient rights) on any
Configuration Manager 2007 R3 site server on which packages are
configured and need to be available for installation via task sequences.
The script contains basic logic to detect failures that might be caused by
the users not having the required rights to perform the configuration
change or failures where the package being modified isnt owned by the
specified site (for example, the script is running on a lower-level primary
site that received packages/programs from its parent site).
Prior to running this script, customize it to match the Configuration
Manager 2007 R3 environment. For example, set the sSiteCode variable
to the correct Configuration Manager 2007 R3 site code. Also, if running
this script against a remote Configuration Manager site server, set the
sProviderServer variable to specify the correct Configuration Manager
site server name and, optionally, the sUsername and sPassword
variables to specify alternate user credentials for the remote connection.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
141
Note Do not configure sUserName or sPassword variables when running the script while logged
on to the Configuration Manager site server.
Note You can modify the script to enable only specific programs or to exclude specific programs
from being enabled.
This script should be run from a Command Prompt window using the
command line cscript.exe EnableProgramForTS.vbs.
Listing 22. Example script to enable the Allow this program to be
installed from the Install Software task sequence without being
advertised check box for all Configuration Manager 2007 R3
programs
' //*******************************************************
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'//-------------------------------------------------------'//
'// Set global variables, used by the ZTIProcess
'// function below.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
'//
'// If ConfigMgr is running on the same server, the
'// sProviderServer value can be left blank and
'// the sUsername and sPassword values must be
'// blank.
'//-------------------------------------------------------Option Explicit
Dim
Dim
Dim
Dim
Dim
sProviderServer
sSiteCode
sNamespace
sUsername
sPassword
sProviderServer = ""
sSiteCode = "CEN"
sNamespace = "root\sms\site_" & sSiteCode
sUsername = ""
sPassword = ""
'//-------------------------------------------------------'// Main routine
'//-------------------------------------------------------ZTIProcess
Function ZTIProcess
Dim
Dim
Dim
Dim
Dim
Dim
Dim
oLocator
oSMS
sQuery
oPrograms
oProgram
iCount
sErr
microsoft.com/technet/SolutionAccelerators
Guide Title
143
sUsername, _
sPassword)
' Build the query
sQuery = "SELECT * FROM SMS_Program"
' Process the query
iCount = 0
Set oPrograms = oSMS.ExecQuery(sQuery)
For Each oProgram in oPrograms
If (oProgram.ProgramFlags And 1) = 0 Then
oProgram.ProgramFlags = oProgram.ProgramFlags Or 1
WScript.Echo "Enabling: " & oProgram.PackageID & _
":" & oProgram.ProgramName
On Error Resume Next
oProgram.Put_
If Err Then
sErr = "ERROR enabling " & oProgram.PackageID & _
":" & oProgram.ProgramName & " " & _
"possibly because of insufficient " & _
"rights or because the package is not " & _
"owned by this site. " & Err.Description
WScript.Echo sErr
Else
iCount = iCount + 1
End If
End If
Next
WScript.Echo "Total programs enabled: " & iCount
End Function
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
145
Add-PSSnapIn Microsoft.BDD.PSSnapIn
Creating a Folder
The following Windows PowerShell commands create an Adobe folder in
the Deployment Workbench console tree at Deployment
Workbench/Deployment Shares/Production/Applications.
Add-PSSnapIn Microsoft.BDD.PSSnapIn
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Note Adding "remove-psdrive" to the script ensures that the background process
finishes before proceeding.
Deleting a Folder
The following Windows PowerShell commands delete the Deployment
Workbench/Deployment Shares/Production/Applications/Adobe folder.
Add-PSSnapIn Microsoft.BDD.PSSnapIn
Add-PSSnapIn Microsoft.BDD.PSSnapIn
Add-PSSnapIn Microsoft.BDD.PSSnapIn
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
147
Add-PSSnapIn Microsoft.BDD.PSSnapIn
Creating an Application
The following Windows PowerShell commands create the Adobe
Reader 9 application using source files from D:\Software\Adobe\Reader 9.
The application will be stored in the Production deployment share, which
is in D:\Production Deployment Share.
Add-PSSnapIn Microsoft.BDD.PSSnapIn
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Deleting an Application
The following Windows PowerShell command deletes the Adobe
Reader 9 application from the Production deployment share.
Remove-item -path "DS002:\Applications\Adobe Reader 9" -Verbose
Add-PSSnapIn Microsoft.BDD.PSSnapIn
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
149
Creating an MDT DB
The following Windows PowerShell commands create a new MDT DB on
the deployment_server server for the Production deployment share. The
database connection will be via TCP/IP.
Add-PSSnapIn Microsoft.BDD.PSSnapIn
Add-PSSnapIn Microsoft.BDD.PSSnapIn
Add-PSSnapIn Microsoft.BDD.PSSnapIn
microsoft.com/technet/SolutionAccelerators
Add-PSSnapIn Microsoft.BDD.PSSnapIn
Add-PSSnapIn Microsoft.BDD.PSSnapIn
Add-PSSnapIn Microsoft.BDD.PSSnapIn
Creating Media
The following Windows PowerShell commands create a source folder that
contains content used to create bootable media. The Production
deployment share will be used as the source. The Everything selection
profile determines what content is placed in the media content folder. The
LiteTouchMedia.iso file will be created when the media is generated. The
media will support both x86 and x64 platforms.
Add-PSSnapIn Microsoft.BDD.PSSnapIn
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
Guide Title
151
Generating Media
The following Windows PowerShell commands create the
LiteTouchMedia.iso file in D:\Media, which will use content from the
MEDIA001 media source folder.
Add-PSSnapIn Microsoft.BDD.PSSnapIn
Deleting Media
The following Windows PowerShell command deletes the MEDIA001
media from the Production deployment share.
Remove-item -path "DS002:\Media\MEDIA001" -Verbose
microsoft.com/technet/SolutionAccelerators
Autologon restrictions
One option to overcome the issues that a GPO might cause during
deployment is to join the computer to the domain as late as possible in the
deployment process. This join can be done using a custom task sequence
step that runs the ZTIDomainJoin.wsf script.
To join the target computer to the domain, the ZTIDomainJoin.wsf script
uses the DomainAdmin, DomainAdminDomain,
DomainAdminPassword, JoinDomain, and MachineObjectOU
properties. You can declare these properties using the Windows
Deployment Wizard, deployment share rules, the MDT DB, and
Configuration Manager 2007 R3 computer and collection rules. The
account used must have the rights required to create and delete computer
objects in the domain.
Typically, the ZTIConfigure.wsf script updates the Unattend.xml or
Unattend.txt file with the values that these properties specify. These
settings are then parsed by the Windows Setup program, and the system
attempts to join to the domain early in the deployment process. Doing so
subjects the target computer to settings specified in domain GPOs and
can possibly cause the deployment process to fail.
To intentionally delay joining the target computer to the domain during the
deployment process, you can remove certain elements from the
Unattend.xml file. The ZTIConfigure.wsf script will skip over writing
properties to the Unattend.xml file if the associated property element is
missing from the file.
Note This sample work-around is only valid when deploying the Windows Vista, Windows 7,
Windows Server 2008, or Windows Server 2008 R2 operating systems.
microsoft.com/technet/SolutionAccelerators
Guide Title
153
1. Click Start, and then point to All Programs. Point to Microsoft Deployment
Toolkit, and then click Deployment Workbench.
2. In the Deployment Workbench console tree, go to Deployment
Workbench/Deployment Shares/deployment_share/Task
Sequences/task_sequence (where deployment_share is the name of the
deployment share and task_sequence is the name of the task sequence to be
configured).
3. In the Actions pane, click Properties.
4. On the OS Info tab, click Edit Unattend.xml.
With the Credentials elements missing from the unattend.xml file, the
ZTIConfigure.wsf script is not able to populate the domain join information
in the Unattend.xml file, which will prevent Windows Setup from
attempting to join the domain.
To add a task sequence step that joins the target computer to the
domain
1. Click Start, and then point to All Programs. Point to Microsoft Deployment
Toolkit, and then click Deployment Workbench.
2. In the Deployment Workbench console tree, go to Deployment
Workbench/Deployment Shares/deployment_share/Task
Sequences/task_sequence (where deployment_share is the name of the
deployment share and task_sequence is the name of the task sequence to be
configured).
3. In the Actions pane, click Properties.
4. On the Task Sequence tab, go to and expand the State Restore node.
5. Verify that the Recover From Domain task sequence step is present. If yes,
proceed to step 9.
6. In the task sequence Properties dialog box, click Add, go to Settings, and
click Recover From Domain.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators
7. Add the Recover From Domain task sequence step to the task sequence
editor. Verify that the step is in the desired location in the task sequence.
8. Verify that the settings for the Recover From Domain task sequence step
are configured to meet your needs.
9. Click OK on the task sequence Properties dialog box to save the task
sequence.
Solution Accelerators
microsoft.com/technet/SolutionAccelerators