Deploy Windows 10 in a test lab using Microsoft Deployment Toolkit (MDT) & Windows Deployment Services (WDS) – “Lite Touch”

Standard

Hello again, in this blog I’m going to walk you through a Windows 10 deployment using Microsoft Deployment Toolkit (MDT) referencing this TechNet Link, I used the below in my lab :-

  1. DC1: Server running Windows Server 2016 acting as a domain controller and a DHCP server.
  2. SCCM1: this is actually my SCCM server, running Windows Server 2016, I also installed the WDS role, Windows Assessment & Deployment Toolkit & MDT of course v8450 , (SCCM will not be part of this blog)
  3. Hyper-V is used as the virtualization platform in this lab.

To follow the same steps of the article, please note that this blog will be divided into sections as follows :-

  1. Install MDT.
  2. Create a deployment share and reference image.
  3. Deploy a Windows 10 image using MDT.

Refreshing and Replacing Windows 10 will be covered in other blogs.

So, let’s start.

1.Install MDT

Installing MDT is a straight forward process, I followed the wizard till the end like below after downloading it from here

2018-01-30 08_09_10-Microsoft Deployment Toolkit (6.3.8450.1000) Setup2018-01-30 08_09_11-Microsoft Deployment Toolkit (6.3.8450.1000) Setup2018-02-02 08_46_12-Microsoft Deployment Toolkit (6.3.8450.1000) License Agreement2018-01-30 08_11_07-Microsoft Deployment Toolkit (6.3.8450.1000) Setup2018-02-02 08_47_21-Microsoft Deployment Toolkit (6.3.8450.1000) Setup

2.Create a deployment share and reference image

First we need to mount the Windows 10 Enterprise DVD into the server, which I did like below, I mounted the .iso file into the VM from the VM settings.

Below screenshot is showing it is Windows 10 pro, I replaced it with Enterprise but you got the idea 🙂

2018-02-02 08_55_38-This PC

From the Start Menu, type “Deployment Workbench”, click it so that the management console opens

2018-02-02 08_58_05-2018-02-02 08_59_31-DeploymentWorkbench - [Deployment Workbench]

From “Deployment Shares” section we will create our first shared place for our reference image, so, click on “New Deployment Share”

2018-02-02 09_00_13-DeploymentWorkbench - [Deployment Workbench_Deployment Shares]

We will follow the wizard exactly as the TechNet article guides us, we will define the deployment share path, name, description and the deployment wizard behavior, after that we will be able to see the new deployment share folder in the deployment workbench as below

2018-02-02 09_01_29-New Deployment Share Wizard2018-02-02 09_01_51-New Deployment Share Wizard2018-02-02 09_02_08-New Deployment Share Wizard2018-02-02 09_02_22-New Deployment Share Wizard2018-02-02 09_02_48-New Deployment Share Wizard2018-02-02 09_02_57-New Deployment Share Wizard2018-02-02 09_03_14-New Deployment Share Wizard2018-02-02 09_03_33-DeploymentWorkbench - [Deployment Workbench_Deployment Shares_MDT build lab (C__

Now we are going to add the operating system from the “Operating Systems” subfolder, we will call it “Windows 10” as below: –

2018-02-02 09_04_39-DeploymentWorkbench - [Deployment Workbench_Deployment Shares_MDT build lab (C__2018-02-02 09_05_11-New Folder2018-02-02 09_05_19-New Folder

Now let’s import the OS, click on “import Operating System” and follow the wizard, we are going to use the DVD we mounted before as our source, continue till the OS appears under the operating systems folder (the wizard will copy the necessary files to the deployment share we created earlier)

2018-02-02 09_05_39-DeploymentWorkbench - [Deployment Workbench_Deployment Shares_MDT build lab (C__2018-02-02 09_07_00-Import Operating System Wizard2018-02-02 09_26_19-Import Operating System Wizard2018-02-02 09_27_01-Import Operating System Wizard2018-02-02 09_27_08-Import Operating System Wizard2018-02-02 09_27_29-Import Operating System Wizard2018-02-02 09_29_29-Import Operating System Wizard2018-02-02 09_29_47-DeploymentWorkbench - [Deployment Workbench_Deployment Shares_MDT build lab (C__

Now is the part of the task sequence we are going to associate with the OS, we will click “New Task Sequence” and define the following: –

  • Task Sequence ID, name and comments.
  • The starting point template.
  • The OS we want to associate the task sequence with.
  • The product key.
  • OS settings like organization name and IE homepage.
  • Admin Password.

Below are all the variables for the reference image task sequence, after finishing the wizard the task sequence will appear under the task sequence folder

2018-02-02 09_30_28-DeploymentWorkbench - [Deployment Workbench_Deployment Shares_MDT build lab (C__2018-02-02 09_31_25-New Task Sequence Wizard2018-02-02 09_31_47-New Task Sequence Wizard2018-02-02 09_32_06-New Task Sequence Wizard2018-02-02 09_32_17-New Task Sequence Wizard2018-02-02 09_33_02-New Task Sequence Wizard2018-02-02 09_33_21-New Task Sequence Wizard2018-02-02 09_33_37-New Task Sequence Wizard2018-02-02 09_33_45-New Task Sequence Wizard2018-02-02 09_34_03-

Now double click on the task sequence we just created, click on “Tattoo”, from the “add” tab, click on “new group”

2018-02-02 09_35_48-Windows 10 Enterprise x64 Default Image Properties

We will add additional step, what is it? we will add .NET Framework 3.5 to the image since many apps require it, this is an example of how to you can alter the task sequence and add the roles and features you like

So, after adding the group give it a name like (Custom Tasks (Pre-Windows Update)), click somewhere else for the name to appear

2018-02-02 09_36_40-Windows 10 Enterprise x64 Default Image Properties2018-02-02 09_37_20-Windows 10 Enterprise x64 Default Image Properties

Now add .NET Framework 3.5 like below

2018-02-02 09_38_21-Windows 10 Enterprise x64 Default Image Properties2018-02-02 09_39_34-Windows 10 Enterprise x64 Default Image Properties

Press apply when done, by default you will see that Windows Update is disabled, we can uncheck the below checkbox to allow the updates, press ok when done

2018-02-02 09_40_28-Windows 10 Enterprise x64 Default Image Properties.jpg

We will visit the properties now for our deployment share to add the rules the image will follow, please copy the below rules and paste them as below

[Settings]
Priority=Default

[Default]
_SMSTSORGNAME=Contoso
UserDataLocation=NONE
DoCapture=YES
OSInstall=Y
AdminPassword=pass@word1
TimeZoneName=Pacific Standard Time
OSDComputername=#Left(“PC-%SerialNumber%”,7)#
JoinWorkgroup=WORKGROUP
HideShell=YES
FinishAction=SHUTDOWN
DoNotCreateExtraPartition=YES
ApplyGPOPack=NO
SkipAdminPassword=YES
SkipProductKey=YES
SkipComputerName=YES
SkipDomainMembership=YES
SkipUserData=YES
SkipLocaleSelection=YES
SkipTaskSequence=NO
SkipTimeZone=YES
SkipApplications=YES
SkipBitLocker=YES
SkipSummary=YES
SkipRoles=YES
SkipCapture=NO
SkipFinalSummary=NO

Important: please alter the variables the way you see fit your organization and lab

This is where I paste the rules

2018-02-02 09_42_59-MDT build lab (C__MDTBuildLab) Properties.jpg

And for the Bootstrap.ini, you will paste the following (Please alter the account who has the right to access the deployment share and grab our image)

[Settings]
Priority=Default

[Default]
DeployRoot=\\SRV1\MDTBuildLab$
UserDomain=CONTOSO
UserID=MDT_BA
UserPassword=pass@word1
SkipBDDWelcome=YES

This is my rules for the Bootstrap.ini

2018-02-02 09_48_23-Bootstrap - Notepad.jpg

OK! great!, press ok when done on all wizards to exit editing the rules, let’s now update our deployment share to tell it that we have finished editing the reference image for it to generate the .iso file for us, so, from the main folder we will click on “Update Deployment Share” and follow the wizard.

2018-02-02 09_49_12-DeploymentWorkbench - [Deployment Workbench_Deployment Shares_MDT build lab (C__2018-02-02 09_50_11-Update Deployment Share Wizard2018-02-02 09_50_24-Update Deployment Share Wizard2018-02-02 09_50_41-Update Deployment Share Wizard2018-02-02 09_58_47-Update Deployment Share Wizard

OK now let’s use the image below to create and capture our VM (LiteTouchPE_x86.iso)

2018-02-02 10_00_08-Boot.jpg

Copy c:\MDTBuildLab\Boot\LiteTouchPE_x86.iso on SRV1 (or your MDT server) to the c:\VHD directory on the Hyper-V host computer.

Note that in MDT, the x86 boot image can deploy both x86 and x64 operating systems, except on computers based on Unified Extensible Firmware Interface (UEFI).

Now on the Hyper-V host itself, you can run the below script to create a new VM from our .iso file and connect to it like below

New-VM REFW10X64-001 -SwitchName poc-internal -NewVHDPath “c:\VHD\REFW10X64-001.vhdx” -NewVHDSizeBytes 60GB
Set-VMMemory REFW10X64-001 -DynamicMemoryEnabled $true -MinimumBytes 1024MB -MaximumBytes 1024MB -Buffer 20
Set-VMDvdDrive REFW10X64-001 -Path c:\VHD\LiteTouchPE_x86.iso
Start-VM REFW10X64-001
vmconnect localhost REFW10X64-001

Please make sure you alter the -SwitchName parameter to fit your environment (this should be the Switch connected to the MDT Server) and alter other specs. as well if you need, for me, I ran the script like below and got my VM created and turned off, what this setup will actually do is : –

  • Install the Windows 10 Enterprise operating system.
  • Install added applications, roles, and features.
  • Update the operating system using Windows Update (or WSUS if optionally specified).
  • Stage Windows PE on the local disk.
  • Run System Preparation (Sysprep) and reboot into Windows PE.
  • Capture the installation to a Windows Imaging (WIM) file.
  • Turn off the virtual machine

2018-02-02 22_14_24-2018-02-02 22_14_58-REFW10X64-001 on localhost - Virtual Machine Connection2018-02-02 22_15_32-REFW10X64-001 on localhost - Virtual Machine Connection2018-02-02 22_16_21-REFW10X64-001 on localhost - Virtual Machine Connection2018-02-02 22_16_41-REFW10X64-001 on localhost - Virtual Machine Connection2018-02-02 22_23_08-REFW10X64-001 on localhost - Virtual Machine Connection2018-02-02 22_52_05-REFW10X64-001 on TOUNY-PC - Virtual Machine Connection2018-02-02 22_52_38-Settings

OK when I revisited my MDT server I found out that the previous procedure has captured the image to the directory below

2018-02-02 11_01_55-Captures.jpg

3.Deploy a Windows 10 image using MDT

We will use the .wim file captured in the previous step for our production imaging deployment, So, again we will create a new deployment share like the one we did before with the following variables

2018-02-02 11_12_41-New Deployment Share Wizard2018-02-02 11_12_58-New Deployment Share Wizard2018-02-02 11_13_12-New Deployment Share Wizard2018-02-02 11_13_25-New Deployment Share Wizard2018-02-02 11_13_37-New Deployment Share Wizard2018-02-02 11_13_51-New Deployment Share Wizard2018-02-02 11_13_55-New Deployment Share Wizard

Then we will create a folder under the “Operating Systems” to import the OS to it based on our captured image this time like below, through the wizard, we will point to the directory of Windows 10 source folder which was copied before to the MDTBuildLab deployment share, please follow the steps below : –

2018-02-02 11_17_02-DeploymentWorkbench - [Deployment Workbench_Deployment Shares_MDT Production (C_2018-02-02 11_17_30-New Folder2018-02-02 11_17_35-New Folder2018-02-02 11_17_41-New Folder2018-02-02 11_17_50-DeploymentWorkbench - [Deployment Workbench_Deployment Shares_MDT Production (C_2018-02-02 11_18_46-Import Operating System Wizard2018-02-02 11_19_48-Open.jpg2018-02-02 11_20_14-Import Operating System Wizard2018-02-02 11_20_48-Import Operating System Wizard2018-02-02 11_21_17-Browse For Folder2018-02-02 11_21_24-Import Operating System Wizard2018-02-02 11_21_50-Import Operating System Wizard2018-02-02 11_21_55-Import Operating System Wizard2018-02-02 11_22_03-Import Operating System Wizard2018-02-02 11_26_38-Import Operating System Wizard

I gave my image a friendly name by changing it to “Windows 10 Enterprise x64 Custom Image”, just double click on the newly created image and change the first field then press OK!

2018-02-02 11_27_25-2018-02-02 11_28_00-REFW10X64-001DDrive in REFW10X64-001 REFW10X64-001.wim Properties

Also like before, we will create the below task sequence for our new custom image like below: –

2018-02-02 11_28_38-DeploymentWorkbench - [Deployment Workbench_Deployment Shares_MDT Production (C_2018-02-02 11_29_53-New Task Sequence Wizard2018-02-02 11_30_06-New Task Sequence Wizard2018-02-02 11_30_21-New Task Sequence Wizard2018-02-02 11_30_33-New Task Sequence Wizard2018-02-02 11_31_01-New Task Sequence Wizard2018-02-02 11_31_33-New Task Sequence Wizard2018-02-02 11_31_40-New Task Sequence Wizard2018-02-02 11_31_51-New Task Sequence Wizard2018-02-02 11_31_58-DeploymentWorkbench - [Deployment Workbench_Deployment Shares_MDT Production (C_

Also like before, we will edit the CustomSettings.ini & Bootstrap.ini files in the MDT Production deployment Rules tab, to follow the article we need to copy those files from the templates directory in MDT by running the below script: –

copy-item “C:\Program Files\Microsoft Deployment Toolkit\Templates\Bootstrap.ini” C:\MDTProd\Control\Bootstrap.ini -Force
copy-item “C:\Program Files\Microsoft Deployment Toolkit\Templates\CustomSettings.ini” C:\MDTProd\Control\CustomSettings.ini -Force

2018-02-02 11_35_05-Administrator_ Windows PowerShell ISE.jpg

This we will edit the Rules by running the below script, don’t forget to alter the rules to fit your environment

[Settings]
Priority=Default

[Default]
_SMSTSORGNAME=Contoso
OSInstall=YES
UserDataLocation=AUTO
TimeZoneName=Pacific Standard Time
OSDComputername=#Left(“PC-%SerialNumber%”,7)#
AdminPassword=pass@word1
JoinDomain=contoso.com
DomainAdmin=administrator
DomainAdminDomain=CONTOSO
DomainAdminPassword=pass@word1
ScanStateArgs=/ue:*\* /ui:CONTOSO\*
USMTMigFiles001=MigApp.xml
USMTMigFiles002=MigUser.xml
HideShell=YES
ApplyGPOPack=NO
SkipAppsOnUpgrade=NO
SkipAdminPassword=YES
SkipProductKey=YES
SkipComputerName=YES
SkipDomainMembership=YES
SkipUserData=YES
SkipLocaleSelection=YES
SkipTaskSequence=NO
SkipTimeZone=YES
SkipApplications=NO
SkipBitLocker=YES
SkipSummary=YES
SkipCapture=YES
SkipFinalSummary=NO
EventService=http://SRV1:9800

Notice how we are going to join our new machine to the domain, notice also that you need to specify the domain admin password in this step and other information, make sure you edit this accurately to save you from troubleshooting errors afterwards

2018-02-02 11_40_13-MDT Production (C__MDTProd) Properties.jpg

I edited the Bootstrap.ini like I did before, by the way, I edited this section wrongly and it caused me a big headache to troubleshoot and figure out why PXE is not able to connect to my MDT server, I then discovered I typed CMAdmiin instead of CMAdmin 🙂 please be careful and accurate

2018-02-02 09_48_23-Bootstrap - Notepad.jpg

Press OK on all wizards to exit rules editing.

The only step remaining is …. yes you guessed it, let’s update the deployment share as we need it to give us our new custom boot image

2018-02-02 11_41_29-DeploymentWorkbench - [Deployment Workbench_Deployment Shares_MDT Production (C_2018-02-02 11_42_01-Update Deployment Share Wizard2018-02-02 11_42_08-Update Deployment Share Wizard2018-02-02 11_42_23-Update Deployment Share Wizard2018-02-02 11_42_34-Update Deployment Share Wizard2018-02-02 11_50_53-Update Deployment Share Wizard

Now let’s start our WDS server services by running the below script

WDSUTIL /Verbose /Progress /Initialize-Server /Server:SRV1 /RemInst:”C:\RemoteInstall”
WDSUTIL /Set-Server /AnswerClients:All

2018-02-02 11_52_06-Administrator_ Windows PowerShell ISE2018-02-02 11_53_21-Administrator_ Windows PowerShell ISE2018-02-02 11_53_50-Administrator_ Windows PowerShell ISE

We will open the Windows Deployment Services and add our custom boot image to the boot images folder for deployment

2018-02-02 11_54_25-2018-02-02 11_55_35-Windows Deployment Services2018-02-02 11_56_09-Add Image Wizard2018-02-02 11_56_24-Select Windows Image File.jpg2018-02-02 11_56_42-Add Image Wizard2018-02-02 11_56_54-Add Image Wizard2018-02-02 11_56_58-Add Image Wizard2018-02-02 11_57_04-Add Image Wizard2018-02-02 11_57_36-Add Image Wizard2018-02-02 11_57_43-Windows Deployment Services

I have an external network adapter which I also disabled before the deployment

2018-02-02 11_58_52-Network Connections.jpg

The cool thing is that we can monitor the deployment process from the deployment workbench by turning on the monitoring for the deployment share like below

2018-02-02 12_00_40-2018-02-02 12_01_21-MDT Production (C__MDTProd) Properties

We can make sure that monitoring service is functional by visiting this link http://localhost:9800/MDTMonitorEvent/

2018-02-02 12_02_18-MonitorEventService Service.jpg

We can also quickly configure our DHCP scope options, below are the options I created, make sure you configured your DHCP correctly, and in case your WDS server is the same as DHCP, make sure you check both checkboxes under the WDS server properties–>DHCP tab

2018-02-03 02_37_00-DC1 on TOUNY-PC - Virtual Machine Connection.jpg

OK, in my Hyper-V host, I ran the below script to create a new generation 1 VM with the specs mentioned in the script, again, make sure you accurately alter the parameters to fit your environment

New-VM –Name “PC2” –NewVHDPath “c:\vhd\pc2.vhdx” -NewVHDSizeBytes 60GB -SwitchName poc-internal -BootDevice NetworkAdapter -Generation 1
Set-VMMemory -VMName “PC2” -DynamicMemoryEnabled $true -MinimumBytes 720MB -MaximumBytes 2048MB -Buffer 20

I then connected to the VM, pressed F12 multiple times till I was able to connect to the WDS server and download the boot image, the OS installation was successful, I logged in as the domain admin as a proof that the machine was successfully joined to the domain, I checked also the system information and the TCP/IP configurations and all seemed fine.

2018-02-03 00_04_35-Administrator_ Windows PowerShell ISE2018-02-03 00_19_02-Administrator_ Windows PowerShell ISE2018-02-03 00_19_17-Hyper-V Manager2018-02-03 01_38_35-PC2 on TOUNY-PC - Virtual Machine Connection2018-02-03 01_39_48-2018-02-03 01_41_23-PC2 on TOUNY-PC - Virtual Machine Connection2018-02-03 01_50_53-PC2 on TOUNY-PC - Virtual Machine Connection2018-02-03 02_08_09-PC2 on TOUNY-PC - Virtual Machine Connection2018-02-03 02_08_31-PC2 on TOUNY-PC - Virtual Machine Connection2018-02-03 02_08_59-PC2 on TOUNY-PC - Virtual Machine Connection2018-02-03 02_34_47-PC2 on TOUNY-PC - Virtual Machine Connection.jpg2018-02-03 02_35_50-PC2 on TOUNY-PC - Virtual Machine Connection

Notice how we can monitor the process in the monitoring section in the deployment workbench under the our deployment share, we also have the options to make a remote desktop or a VM connection

2018-02-03 02_33_13-SCCM1 on TOUNY-PC - Virtual Machine Connection

2018-02-03 02_33_44-SCCM1 on TOUNY-PC - Virtual Machine Connection.jpg

OK! great! now we have a Windows 10 PC up and running, the options really are limitless when it comes to editing the rules of the image, we can add roles, features and many other custom tasks to the task sequence.

I took a snapshot of my Windows 10 VM as a preparation for the next lab as we’re going to try the refreshment and replacement of the OS.

We will also continue to see how the OSD process are made from the SCCM perspective.

Thanks for reading, see you in another blog.