Build a distributed environment for Windows 10 deployment
Applies to:
- Windows 10
Perform the steps in this article to build a distributed environment for Windows 10 deployment. A distributed environment for deployment is useful when you have a segmented network, for example one that is segmented geographically into two branch locations. If you work in a distributed environment, replicating the deployment shares is an important part of a deployment solution because images of 5 GB or more in size can present bandwidth issues when deployed over the wire. Replicating this content enables clients to do local deployments.
Four computers are used in this article: DC01, MDT01, MDT02, and PC0006. DC01 is a domain controller, MDT01 and MDT02 are domain member computers running Windows Server 2019, and PC0006 is a blank device where we'll deploy Windows 10. The second deployment server (MDT02) will be configured for a remote site (Stockholm) by replicating the deployment share on MDT01 at the original site (New York). All devices are members of the domain contoso.com for the fictitious Contoso Corporation.
For the purposes of this article, we assume that MDT02 is prepared with the same network and storage capabilities that were specified for MDT01, except that MDT02 is located on a different subnet than MDT01. For more information on the infrastructure setup for this article, see Prepare for deployment with MDT.
Computers used in this article.
Note
HV01 is also used in this topic to host the PC0006 virtual machine.
Replicate deployment shares
Replicating the content between MDT01 (New York) and MDT02 (Stockholm) can be done in different ways. The most common content replication solutions with Microsoft Deployment Toolkit (MDT) use either the Linked Deployment Shares (LDS) feature or Distributed File System Replication (DFS-R). Some organizations have used a simple robocopy script for replication of the content.
Note
Robocopy has options that allow for synchronization between folders. It has a simple reporting function; it supports transmission retry; and, by default, it will only copy/remove files from the source that are newer than files on the target.
Linked deployment shares in MDT
LDS is a built-in feature in MDT for replicating content. However, LDS works best with strong connections such as LAN connections with low latency. For most WAN links, DFS-R is the better option.
Why DFS-R is a better option
DFS-R isn't only fast and reliable, but it also offers central monitoring, bandwidth control, and a great delta replication engine. DFS-R will work equally well whether you have 2 sites or 90. When using DFS-R for MDT, we recommend running your deployment servers on Windows Server 2008 R2 or higher. From that version on, you can configure the replication targets as read-only, which is exactly what you want for MDT. This way, you can have your main deployment share centralized and replicate out changes as they happen. DFS-R will quickly pick up changes at the central deployment share in MDT01 and replicate the delta changes to MDT02.
Set up Distributed File System Replication (DFS-R) for replication
Setting up DFS-R for replication is a quick and straightforward process: Prepare the deployment servers, create a replication group, then configure some replication settings.
Prepare MDT01 for replication
On MDT01:
Install the DFS Replication role on MDT01 by entering the following at an elevated Windows PowerShell prompt:
Install-WindowsFeature -Name FS-DFS-Replication -IncludeManagementTools
Wait for installation to complete, and then verify that the installation was successful. See the following output:
PS C:\> Install-WindowsFeature -Name FS-DFS-Replication -IncludeManagementTools Success Restart Needed Exit Code Feature Result ------- -------------- --------- -------------- True No Success {DFS Replication, DFS Management Tools, Fi...
Prepare MDT02 for replication
On MDT02:
Perform the same procedure on MDT02 by entering the following at an elevated Windows PowerShell prompt:
Install-WindowsFeature -Name FS-DFS-Replication -IncludeManagementTools
Wait for installation to complete, and then verify that the installation was successful. See the following output:
PS C:\> Install-WindowsFeature -Name FS-DFS-Replication -IncludeManagementTools Success Restart Needed Exit Code Feature Result ------- -------------- --------- -------------- True No Success {DFS Replication, DFS Management Tools, Fi...
Create the MDTProduction folder on MDT02
On MDT02:
Create and share the D:\MDTProduction folder using default permissions by entering the following at an elevated command prompt:
mkdir d:\MDTProduction New-SmbShare -Name "MDTProduction$" -Path "D:\MDTProduction"
You should see the following output:
C:\> New-SmbShare -Name "MDTProduction$" -Path "D:\MDTProduction" Name ScopeName Path Description ---- --------- ---- ----------- MDTProduction$ * D:\MDTProduction
Configure the deployment share
When you have multiple deployment servers sharing the same content, you need to configure the Bootstrap.ini file with information about which server to connect to based on where the client is located. In MDT that can be done by using the DefaultGateway property.
On MDT01:
Using Notepad, navigate to the D:\MDTProduction\Control folder and modify the
Boostrap.ini
file as follows. Under[DefaultGateway]
enter the IP addresses for the client's default gateway in New York and Stockholm, respectively (replace 10.10.10.1 and 10.10.20.1 with your default gateways). The default gateway setting is what tells the client which deployment share (that is, server) to use.[Settings] Priority=DefaultGateway, Default [DefaultGateway] 10.10.10.1=NewYork 10.10.20.1=Stockholm [NewYork] DeployRoot=\\MDT01\MDTProduction$ [Stockholm] DeployRoot=\\MDT02\MDTProduction$ [Default] UserDomain=CONTOSO UserID=MDT_BA UserPassword=pass@word1 SkipBDDWelcome=YES
Note
The DeployRoot value needs to go into the Bootstrap.ini file, but you can use the same logic in the CustomSettings.ini file. For example, you can redirect the logs to the local deployment server (SLSHARE), or have the User State Migration Tool (USMT) migration store (UDDIR) local. To learn more about USMT, see Refresh a Windows 7 computer with Windows 10 and Replace a Windows 7 computer with a Windows 10 computer.
Save the
Bootstrap.ini
file.Using the Deployment Workbench, right-click the MDT Production deployment share and select Update Deployment Share. Use the default settings for the Update Deployment Share Wizard. This process will take a few minutes.
After the update is complete, use the Windows Deployment Services console on MDT01. In the Boot Images node, right-click the MDT Production x64 boot image and select Replace Image.
Browse and select the D:\MDTProduction\Boot\LiteTouchPE_x64.wim boot image, and then complete Replace Boot Image Wizard using the default settings.
Replacing the updated boot image in WDS.
Tip
If you modify bootstrap.ini again later, be sure to repeat the process of updating the deployment share in the Deployment Workbench and replacing the boot image in the WDS console.
Replicate the content
Once the MDT01 and MDT02 servers are prepared, you're ready to configure the actual replication.
Create the replication group
On MDT01, using DFS Management (dfsmgmt.msc), right-click Replication, and select New Replication Group.
On the Replication Group Type page, select Multipurpose replication group, and select Next.
On the Name and Domain page, assign the MDTProduction name, and select Next.
On the Replication Group Members page, select Add, add MDT01 and MDT02, and then select Next.
Adding the Replication Group Members.
On the Topology Selection page, select the Full mesh option and select Next.
On the Replication Group Schedule and Bandwidth page, accept the default settings and select Next.
On the Primary Member page, select MDT01 and select Next.
On the Folders to Replicate page, select Add, enter D:\MDTProduction as the folder to replicate, select OK, and then select Next.
On the Local Path of MDTProduction on the Other Members page, select MDT02, and select Edit.
On the Edit page, select the Enabled option, type in D:\MDTProduction as the local path of folder, select the Make the selected replicated folder on this member read-only check box, select OK, and then select Next.
On the Review Settings and Create Replication Group page, select Create.
On the Confirmation page, select Close.
Configure replicated folders
On MDT01, using DFS Management, expand Replication and then select MDTProduction.
In the middle pane, right-click the MDT01 member and select Properties.
On the MDT01 (MDTProduction) Properties page, configure the following and then select OK:
In the Staging tab, set the quota to 20480 MB.
In the Advanced tab, set the quota to 8192 MB.
In this scenario the size of the deployment share is known, but you might need to change the values for your environment. A good rule of thumb is to get the size of the 16 largest files and make sure they fit in the staging area. Below is a Windows PowerShell example that calculates the size of the 16 largest files in the D:\MDTProduction deployment share:
(Get-ChildItem D:\MDTProduction -Recurse | Sort-Object Length -Descending | Select-Object -First 16 | Measure-Object -Property Length -Sum).Sum /1GB
In the middle pane, right-click the MDT02 member and select Properties.
On the MDT02 (MDTProduction) Properties page, configure the following and then select OK:
In the Staging tab, set the quota to 20480 MB.
In the Advanced tab, set the quota to 8192 MB.
Note
It will take some time for the replication configuration to be picked up by the replication members (MDT01 and MDT02). The time for the initial sync will depend on the WAN link speed between the sites. After that, delta changes are replicated quickly.
Verify that MDT01 and MDT02 are members of the MDTProduction replication group, with MDT01 being primary as follows using an elevated command prompt:
C:\> dfsradmin membership list /rgname:MDTProduction /attr:MemName,IsPrimary MemName IsPrimary MDT01 Yes MDT02 No
Verify replication
On MDT02:
Wait until you start to see content appear in the D:\MDTProduction folder.
Using DFS Management, expand Replication, right-click MDTProduction, and select Create Diagnostics Report.
In the Diagnostics Report Wizard, on the Type of Diagnostics Report or Test page, choose Health report and select Next.
On the Path and Name page, accept the default settings and select Next.
On the Members to Include page, accept the default settings and select Next.
On the Options page, accept the default settings and select Next.
On the Review Settings and Create Report page, select Create.
Open the report in Internet Explorer, and if necessary, select the Allow blocked content option.
The DFS Replication Health Report.
Note
If there are replication errors you can review the DFS event log in Event Viewer under Applications and Services Logs.
Configure Windows Deployment Services (WDS) in a remote site
Like you did in the previous article for MDT01, you need to add the MDT Production Lite Touch x64 Boot image to Windows Deployment Services on MDT02. For the following steps, we assume that WDS has already been installed on MDT02.
On MDT02, using the WDS console, right-click Boot Images and select Add Boot Image.
Browse to the D:\MDTProduction\Boot\LiteTouchPE_x64.wim file and add the image with the default settings.
Deploy a Windows 10 client to the remote site
Now you should have a solution ready for deploying the Windows 10 client to the remote site: Stockholm, using the MDTProduction deployment share replica on MDT02. You can test this deployment with the following optional procedure.
Note
For demonstration purposes, the following procedure uses a virtual machine (PC0006) hosted by the Hyper-V server HV01. To use the remote site server (MDT02) the VM must be assigned a default gateway that matches the one you entered in the Boostrap.ini
file.
Create a virtual machine with the following settings:
- Name: PC0006
- Location: C:\VMs
- Generation: 2
- Memory: 2048 MB
- Hard disk: 60 GB (dynamic disk)
- Install an operating system from a network-based installation server
Start the PC0006 virtual machine, and press Enter to start the Pre-Boot Execution Environment (PXE) boot. The VM will now load the Windows PE boot image from the WDS server.
After Windows Preinstallation Environment (Windows PE) has booted, complete the Windows Deployment Wizard using the following settings:
- Select a task sequence to execute on this computer: Windows 10 Enterprise x64 RTM Custom Image
- Computer Name: PC0006
- Applications: Select the Install - Adobe Reader
Setup will now start and perform the following steps:
- Install the Windows 10 Enterprise operating system.
- Install applications.
- Update the operating system using your local Windows Server Update Services (WSUS) server.