Introduction
In a previous post I showed you how you can deploy Windows 10 x64 (version 1507) to the Microsoft Surface Pro 4 using MDT 2013 Update 1.
This script has been updated with the following changes:
- Windows 10 x64 (version 1511, updated February 2016 media)
- Microsoft Deployment Toolkit (MDT) 2013 Update 2
- Latest available 2016 drivers for the Surface Pro 4
- Windows 10 ADK (version 1511)
Note: Microsoft has released two versions of Windows 10 x64 (version 1511). The first release was the original and released in November 2015, the second release was an updated release in February 2016. For this guide I’ve used the February 2016 release available on the Microsoft Volume License Site. The script does care which release you use, as the previous release of Windows 10 x64 version 1511 shows up as Technical Preview wheras the February release does not.
Note: This is fully automated, and as this does install a Windoes Deployment Services server role hosting a boot image, you should modify the script accordingly and test it thoroughly in a lab first.
This script is tailored for one thing only, deploying Windows 10 x64 to the Microsoft Surface Pro 4 with all drivers loaded and MDT 2013 Update 2 pre-configured. Download it and customize it to suit your needs for other hardware if you wish because what it does is pretty cool.
This script performs the following actions:-
- Downloads and then Installs Windows ADK 10 (version 1511) if you have not done so already
- Downloads and then Installs MDT 2013 Update 2 if you have not done so already
- Downloads all required drivers for Microsoft Surface Pro 4 if you have not done so already
- Imports the Windows 10 x64 (version 1511) operating system into MDT
- Imports the Microsoft Surface Pro 4 drivers into MDT
- Creates Selection Profiles for Microsoft Surface Pro 4 and WinPE x64
- Creates a Deploy Windows 10 x64 – Surface Pro 4 task sequence
- Edits the Deploy Windows 10 x64 – Surface Pro 4 task sequence and adds an inject drivers step for Microsoft Surface Pro 4
- Sets a WMI query for hardware detection for the Surface Pro 4 on the corresponding driver step
- Injects the Microsoft Surface Pro 4 network drivers into the LiteTouchPE_x64.wim
- Creates custom CustomSettings.ini and BootStrap.ini files
- Disables the X86 boot wim (as it is not needed for Surface Pro 4)
- Changes the Selection Profile for the X64 boot wim to use the WinPE x64 selection profile
- Installs the Windows Deployment Service role
- Configures the WDS role and adds the previously created LiteTouchPE_x64.wim
- Starts the WDS service so that you can PXE boot (UEFI network boot).
All you have to do is download the script below, modify some variables, then place certain files in the right place such as the Windows 10 x64 Enterprise (version 1511) media. Please ensure you have a working DHCP scope on your Active Directory domain controller, then PXE boot a Microsoft Surface Pro 4 and sit back and enjoy the show.
Step 1. Download the script
The PowerShell script will do all the hard work for you, it is in the Downloads section at the end of this guide, download it, unzip it and place it on a server (running Windows Server 2012 R2) that is designated to be the MDT 2013 server. I’ve tested it on Windows Server 2012R2 only, if you run it on a different operating system and have issues then please post your results below.
Step 2. Configure the variables in the script
Once you have downloaded and extracted the script, you need to configure certain variables interspersed throughout the script. I’ll highlight the ones you need to edit.
The most important of them is the $SourcePath variable (line 59) as this decides where to get the content from and where to store it. This variable should point to a valid drive letter, the folder name will be created if it does not exist.
The $FolderPath variable (line 239) specifies the MDT Deployment share root folder for example E:\MDTDeploy.
There are other variables to configure, for joining the Domain (lines 316-318)
and then you need to configure how you actually connect to the MDT server from WinPE (lines 392-396)
Step 3. Copy the Windows 10 x64 (version 1511) operating system files
Mount a Microsoft Windows 10 x64 Enterprise (version 1511) ISO and copy the contents to $SourcePath\Operating System Images\ as shown below
Step 4. Optionally copy MDT 2013 Update 2, ADK 10, Surface Pro 4 drivers
This is an optional step. If you’ve already downloaded the above files then place them in the source folder, otherwise the script will download them for you. You do not have to do this as the script will download the content for you if it’s not found.
Step 5. Optionally copy your Applications to the respective folders
This is an optional step. If you have apps like Office 365, copy them to their respective folders under Applications
If you do add any applications, you’ll need to edit the corresponding section within the script for the CustomSettings.ini and replace the guid for the App
as shown here (line 358)
Step 6. Run the script
On the server that is to be your MDT server, start PowerShell ISE as Administrator.
Click on the green triangle to run the script. Below you can see the script in action
After the script is complete, you are ready to test deploying a Microsoft Surface Pro 4 installation.
After running the script you can see that WDS is installed and that the LiteTouch_X64 boot wim is imported into WDS.
After opening the Deployment Workbench, you can see the Deploy Windows 10 x64 – Surface Pro 4 task sequence is created
The Surface Pro 4 drivers step is configured
and the WMI query for the hardware is also added
and drivers specific to the Surface Pro 4 are imported
and custom selection profiles are created
Step 7. Sit back and watch the deployment
Take a properly shutdown Surface Pro 4, and power it on using the following sequence. Hold the down volume key and then press the power button while continuing to hold down the volume key, it should PXE boot. Press enter when prompted
and then it will load the MDT LitetouchPE_X64 boot wim.
before prompting you for a computer name, note that it’s currently set to SurfacePro4 in CustomSettings.ini contained within the script,
If you have optional apps they’ll be listed here along with the mandatory Office 365 ProPlus
you can change that behavior in the UI itself (CustomSettings.ini on the Properties/Rules of the DeploymentShare) or automate it via the many methods available such as those that Mikael describes here
click Next and off it goes,
before installing the Applications..
and finally it’s all complete !
Troubleshooting
If the script has issues starting WDS (and you see the error below)
Quote
An error occurred while trying to execute the command.
Error Code: 0x41D
Error Description: The service did not respond to the start or control request in a timely fashion.
then restart the server, as you were asked to do at the end of the script ;-).
If you cannot PXE boot, because WDS is not accepting connections (revealed by the PXE Response tab in WDS properties), then look for the following error in the scripts output:
setting PXE response policy... Windows Deployment Services Management Utility [Version 6.3.9600.16384] © 2013 Microsoft Corporation. All rights reserved. An error occurred while trying to execute the command. Error Code: 0x5 Error Description: Access is denied.
If you see that error, then the user you are logged in as does not have sufficient permissions to configure WDS. To resolve, make sure to Delegate permission in Active Directory for the User you are running this as, and allow that user Full Control of Computer Objects in that OU.
You can test whether the permission change works by issuing the following after the script is complete:
WDSUTIL /Set-Server /AnswerClients:All
For deployment issues, you can review the logs found in the following locations depending on what part of the OSD process you are in:-
In WinPE
- X:\windows\temp\SMSTSLOG
In Windows
- C:\Windows\Temp\DeploymentLogs
- C:\MININT\SMSOSD\OSDLOGS
- C:\Users\Administrator\Appdata\Local\temp\SMSTSLog
Summary
Automating the deployment of Windows 10 x64 Enterprise to the Microsoft Surface Pro 4 is possible and script-able with PowerShell and MDT 2013 Update 2.
Related Reading
- How can I deploy Windows 10 x64 to the Microsoft Surface Pro 4 using MDT 2013 Update 1 – https://www.windows-…-2013-update-1/
Downloads
Download the PowerShell script – Deploy Microsoft Surface Pro 4 with MDT 2013 Update 2 – April 2016.zip 6.4KB 8 downloads
You can download a Microsoft Word copy of this guide here – How can I use PowerShell to deploy Windows 10 x64 to the Microsoft Surface Pro 4 using MDT 2013 Update 2.zip 1.91MB 13 downloads