Building a Clean Windows 10 Reference Image – MDT 2013 U1

In this post i will go through the steps i have taken to build my Windows 10 (Build 1511) Reference image. I have Confimgr 2012 R2Sp1 Cu1 and MDT 2013 Update 1 (Integrated) 
This post assumes the following:

After following Johans steps, go back into your task sequence and add the following steps:
After the step “Apply Local GPO Package” add a step named “Pause” with a run command line of:

cscript.exe %SCRIPTROOT%\LTISuspend.wsf 

Adding the pause step will cause the TS to pause, letting you configure your image as much as you like. To resume the task sequence you would run the “Resume Task Sequence” shortcut that is placed on your desktop. 

Go back to your list of applications and add a new application called “Cleanup Windows Before Sysprep” – your step should look like below: 
Adding this step will clean the hard disk of any unnecessary files before capture. especially if your build and capture installs lots of updates. 
Add this app as a step in the following location:

( i like to put a restart either side of this)

It is important to ensure that your reference machine does not connect to the internet during capture, depending on your network setup you may have to change your network settings.
Insert a step similar to the following;

Open your VM Console and point your VM to boot off your newly created media in your MDT Boot Folder (x86/x64). If all steps have been followed correctly you should be prompted to choose your Task Sequence, if you get additional prompts first make sure you have set your Bootstrap.ini  correctly (if not refer back to Johans guide)

 

When your task sequence gets to the Pause step you will see this prompt:

The few things i do set during the “Pause” is : Setting language preferences etc

Apply Language Pack 

To apply language packs offline, first login to your VLC and download the following file ISO:
This download is specific to the 1511 build (November ’15)
Extract the downloaded iso (SW_DVD5_Win_10_1511_32-BIT_X64_MultiLang_LangPackAll_LIP_OEM_VL_X20-75632) to a network location.
Perform the command seen in the below screenshot on the machine for each language pack you intend to install (make sure command prompt is elevated):
Once you have installed the language pack you will need to go ahead and add it as default if need be. In my case i wanted to set en-GB (English United Kingdom) as default system wide, including speech. Simply installing the language pack above will not give you all the features you need.
Microsoft have now split the way they manage language packs in an attempt to reduce disk real estate, they now include these items as “Features on Demand”. You COULD get these by connecting your Reference VM to the internet, but this is never recommended, as you cant control what other nasties get applied behind the scenes.  (See: http://blogs.technet.com/b/mniehaus/archive/2015/11/23/seeing-extra-apps-turn-them-off.aspx )

You can read more about this here: https://msdn.microsoft.com/en-us/library/windows/hardware/mt171094(v=vs.85).aspx

What you will want to do next is log back into your VLC and download the following: 

SW_DVD9_NTRL_Win_10_1511_64Bit_MultiLang_Feat_on_Demand_X20-75989.ISO

The contents of this file are:

https://gist.github.com/padgo/0885be223d1b94a0293a.js

To Enable these features, you will want to perform the following command(s):
(these are for en-GB only)
DISM /Online /Add-Package /PackagePath:Microsoft-Windows-LanguageFeatures-Handwriting-en-gb-Package.cab
DISM /Online /Add-Package /PackagePath:Microsoft-Windows-LanguageFeatures-OCR-en-gb-Package.cab
DISM /Online /Add-Package /PackagePath:Microsoft-Windows-LanguageFeatures-Speech-en-gb-Package.cab
DISM /Online /Add-Package /PackagePath:Microsoft-Windows-LanguageFeatures-TextToSpeech-en-gb-Package.cab
DISM /Online /Add-Package /PackagePath:Microsoft-Windows-LanguageFeatures-Basic-en-gb-Package.cab

You will now be able to choose en-GB from the speech menu:

Capture:

Once you are happy with your customisations go ahead and run the desktop shortcut to resume the task sequence and capture.

Reference Completion:

Once your WIM is captured to disk you can go ahead and import it into SCCM. 

Windows 10 Task Sequence :

I will outline some of the specific steps i perform during my Windows 10 TS. This will not be an in-depth TS guide. If you want specific steps regarding Bitlocker/MBAM please see my detailed guide here

Set AD Description & Group Membership

To set AD Description and Groups during your TS you will need the following two scripts.

1. Set AD Groups

wscript.exe adgroup.vbs "Group"

2. Set AD Description

cscript.exe "adcompdesc.vbs" "[%XHWChassisType%] - [%Model%] - [%PrimaryUsername%]"

Note: These variables are set earlier in my TS

Start Menu Customisation:

Customisations to the start menu are stored per user profile, so its best to build your Start Menu the way you like it, then export the configuration. You can either then re-import this during your build task sequence (like i do) or you can set this via Group Policy. If you do set your Start Layout via Group Policy users will not be allowed to pin items or customise it in any way, 
Things to note: If you want to include Office and other applications in your base start menu layout, you will need to do this while they are installed. If you don’t install these apps on your base image (and its not a good idea too usually) you can export the start menu from a finished and imaged machine with these apps (Capturing start menu layout on a clean machine is not too important)
To export your start menu layout run the following command:
Export-StartLayout -Path C:\StartLayout.XML
To import:
powershell.exe -executionpolicy bypass import-startlayout -layoutpath .\start-layout.xml -mountpath %systemdrive%\
My Start Layout:





























The above config will give you this layout this example shows office 2013, code above is for 2016):

Remove Unwanted W10 Apps

Do not remove any apps during your image capture – see here for why
Here is the full list of Windows Packages installed in the 1511 Build

Get-AppxProvisionedPackage -Online
































DisplayNamePackageName
----------------------
Microsoft.3DBuilderMicrosoft.3DBuilder_10.9.50.0_neutral_~_8wekyb3d8bbwe
Microsoft.AppconnectorMicrosoft.Appconnector_2015.707.550.0_neutral_~_8wekyb3d8bbwe
Microsoft.BingFinanceMicrosoft.BingFinance_4.6.169.0_neutral_~_8wekyb3d8bbwe
Microsoft.BingNewsMicrosoft.BingNews_4.6.169.0_neutral_~_8wekyb3d8bbwe
Microsoft.BingSportsMicrosoft.BingSports_4.6.169.0_neutral_~_8wekyb3d8bbwe
Microsoft.BingWeatherMicrosoft.BingWeather_4.6.169.0_neutral_~_8wekyb3d8bbwe
Microsoft.CommsPhoneMicrosoft.CommsPhone_1.10.15000.0_neutral_~_8wekyb3d8bbwe
Microsoft.ConnectivityStoreMicrosoft.ConnectivityStore_1.1509.1.0_neutral_~_8wekyb3d8bbwe
Microsoft.GetstartedMicrosoft.Getstarted_2.3.7.0_neutral_~_8wekyb3d8bbwe
Microsoft.MessagingMicrosoft.Messaging_1.10.22012.0_neutral_~_8wekyb3d8bbwe
Microsoft.MicrosoftOfficeHubMicrosoft.MicrosoftOfficeHub_2015.6306.23501.0_neutral_~_8wekyb3d8bbwe
Microsoft.MicrosoftSolitaireCollectionMicrosoft.MicrosoftSolitaireCollection_3.3.9211.0_neutral_~_8wekyb3d8bbwe
Microsoft.Office.OneNoteMicrosoft.Office.OneNote_2015.6131.10051.0_neutral_~_8wekyb3d8bbwe
Microsoft.Office.SwayMicrosoft.Office.Sway_2015.6216.20251.0_neutral_~_8wekyb3d8bbwe
Microsoft.PeopleMicrosoft.People_2015.1012.106.0_neutral_~_8wekyb3d8bbwe
Microsoft.SkypeAppMicrosoft.SkypeApp_3.2.1.0_neutral_~_kzf8qxf38zg5c
Microsoft.Windows.PhotosMicrosoft.Windows.Photos_2015.1001.17200.0_neutral_~_8wekyb3d8bbwe
Microsoft.WindowsAlarmsMicrosoft.WindowsAlarms_2015.1012.20.0_neutral_~_8wekyb3d8bbwe
Microsoft.WindowsCalculatorMicrosoft.WindowsCalculator_2015.1009.20.0_neutral_~_8wekyb3d8bbwe
Microsoft.WindowsCameraMicrosoft.WindowsCamera_2015.1071.40.0_neutral_~_8wekyb3d8bbwe
microsoft.windowscommunicationsappsmicrosoft.windowscommunicationsapps_2015.6308.42271.0_neutral_~_8wekyb3d8bbwe
Microsoft.WindowsMapsMicrosoft.WindowsMaps_4.1509.50911.0_neutral_~_8wekyb3d8bbwe
Microsoft.WindowsPhoneMicrosoft.WindowsPhone_2015.1009.10.0_neutral_~_8wekyb3d8bbwe
Microsoft.WindowsSoundRecorderMicrosoft.WindowsSoundRecorder_2015.1012.110.0_neutral_~_8wekyb3d8bbwe
Microsoft.WindowsStoreMicrosoft.WindowsStore_2015.1013.14.0_neutral_~_8wekyb3d8bbwe
Microsoft.XboxAppMicrosoft.XboxApp_2015.930.526.0_neutral_~_8wekyb3d8bbwe
Microsoft.ZuneMusicMicrosoft.ZuneMusic_2019.6.13251.0_neutral_~_8wekyb3d8bbwe
Microsoft.ZuneVideoMicrosoft.ZuneVideo_2019.6.13251.0_neutral_~_8wekyb3d8bbwe

These are the apps i remove. 

remove-AppxProvisionedPackage -package Microsoft.3DBuilder_10.9.50.0_neutral_~_8wekyb3d8bbwe -Online
remove-AppxProvisionedPackage -package Microsoft.BingFinance_4.6.169.0_neutral_~_8wekyb3d8bbwe -Online
remove-AppxProvisionedPackage -package Microsoft.Messaging_1.10.22012.0_neutral_~_8wekyb3d8bbwe -Online
remove-AppxProvisionedPackage -package Microsoft.MicrosoftOfficeHub_2015.6306.23501.0_neutral_~_8wekyb3d8bbwe -Online
remove-AppxProvisionedPackage -package Microsoft.People_2015.1012.106.0_neutral_~_8wekyb3d8bbwe -Online
remove-AppxProvisionedPackage -package Microsoft.SkypeApp_3.2.1.0_neutral_~_kzf8qxf38zg5c -Online
remove-AppxProvisionedPackage -package Microsoft.WindowsStore_2015.1013.14.0_neutral_~_8wekyb3d8bbwe -Online
remove-AppxProvisionedPackage -package Microsoft.XboxApp_2015.930.526.0_neutral_~_8wekyb3d8bbwe -Online
remove-AppxProvisionedPackage -package Microsoft.ZuneMusic_2019.6.13251.0_neutral_~_8wekyb3d8bbwe -Online
remove-AppxProvisionedPackage -package Microsoft.ZuneVideo_2019.6.13251.0_neutral_~_8wekyb3d8bbwe -Online
remove-AppxProvisionedPackage -package microsoft.windowscommunicationsapps_2015.6308.42271.0_neutral_~_8wekyb3d8bbwe -Online
remove-AppxProvisionedPackage -package Microsoft.ConnectivityStore_1.1509.1.0_neutral_~_8wekyb3d8bbwe -Online
To remove these apps during OSD, follow the guide here:

http://blogs.technet.com/b/mniehaus/archive/2015/11/11/removing-windows-10-in-box-apps-during-a-task-sequence.aspx#comments

The contents of my XML file he talks about is:

Formatted exactly as this:

Microsoft.3DBuilder
Microsoft.Appconnector
Microsoft.BingSports
Microsoft.Getstarted
Microsoft.MicrosoftOfficeHub
Microsoft.MicrosoftSolitaireCollection
Microsoft.Office.OneNote
Microsoft.People
Microsoft.SkypeApp
Microsoft.XboxApp
Microsoft.CommsPhone
Microsoft.ConnectivityStore
microsoft.windowscommunicationsapps
Microsoft.ZuneMusic
Microsoft.ZuneVideo

%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy bypass -file .\RemoveApps.ps1

Set Default App Associations

I set default application associations during build. If you set these via group policy they will be locked and users will not be able to set their own. See here for more info.
dism /online /Import-DefaultAppAssociations:"DefaultAppAssoc.xml"
This specific file is simply changing the default PDF viewer to Acrobat. 














































































Block Windows 10 Apps Installing

Add this step to your TS to block windows installing store apps as soon as it gets an internet connection, this would undo all your hard work in removing unwanted apps . See here for more info
reg add HKLM\Software\Policies\Microsoft\Windows\CloudContent /v DisableWindowsConsumerFeatures /t REG_DWORD /d 1 /f
Also add Policies\Administrative Templates\Windows Components\Cloud Content:Turn off Microsoft consumer expierences GPO item 

Finish

And there you go, hope this guide was helpful!
Please leave feedback or questions and ill get back to you.
Cheers, 
Dan

12 thoughts on “Building a Clean Windows 10 Reference Image – MDT 2013 U1

  1. Hi there,

    Firstly, thank you for such a great guide. Followed it through and have what I think would make a great image. However, I think my base wim file was an older version, which when it did updates took it to the 1511 version and created a windows.old folder.
    Now, when I try to resume my task sequence it has removed the icon from the desktop and not restarted the sequence. No error, nothing.

    Is there anyway I can get this to kick off again (reboots don't seem to kick it to life)?

    Thanks!

    Like

  2. Hi mate,

    Glad you liked the guide. I would suggest starting again with the 1511 media, remember this being your gold image you dont want to bring with it any potential issues that you are going to push to hundreds of machines .

    cheers

    Dan

    Like

  3. I am building a Windows 10 reference image now. If the privacy settings are disabled in the reference image, does Sysprep wipe out those changes during capture?

    Like

  4. Nice blog. What about removing OneDrive completely? In our environnement, we uses Office 2016 Pro Plus and each of our users have OneDrive Enterprise. Se, we uninstall OneDrive on the computer. I have a working script but is seams to work only for the logged on user.

    Code :

    @echo off
    cls

    set x86=”%SYSTEMROOT%\System32\OneDriveSetup.exe”
    set x64=”%SYSTEMROOT%\SysWOW64\OneDriveSetup.exe”

    echo Closing OneDrive process.
    echo.
    taskkill /f /im OneDrive.exe > NUL 2>&1
    ping 127.0.0.1 -n 5 > NUL 2>&1

    echo Uninstalling OneDrive.
    echo.
    if exist %x64% (
    %x64% /uninstall
    ) else (
    %x86% /uninstall
    )
    ping 127.0.0.1 -n 5 > NUL 2>&1

    echo Removing OneDrive leftovers.
    echo.
    rd “%USERPROFILE%\OneDrive” /Q /S > NUL 2>&1
    rd “C:\OneDriveTemp” /Q /S > NUL 2>&1
    rd “%LOCALAPPDATA%\Microsoft\OneDrive” /Q /S > NUL 2>&1
    rd “%PROGRAMDATA%\Microsoft OneDrive” /Q /S > NUL 2>&1

    echo Removeing OneDrive from the Explorer Side Panel.
    echo.
    REG DELETE “HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}” /f > NUL 2>&1
    REG DELETE “HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}” /f > NUL 2>&1

    Like

  5. I've installed windows 8.1 on my laptop after buying license from ODosta Store, I want to activate it to get free upgrade from windows 7 professional to windows 10 home.
    I'm now confused, How to activate and upgrade to windows 10.
    Please mention within details.

    Like

  6. No doubt, As Windows 7 is the most recommended OS, Which through user can do almost all work without any problem, Where I recommend you to activate your OS being purchased its license code from: cheaproduct
    Which is distributing license for almost all types of Microsoft Products. I personally use it and have a good experience.

    Like

  7. Windows 7 support is over, but there's no doubt, As Windows 7 is the most recommended OS, Which through user can do almost all work without any problem, Where I recommend you to activate your OS being purchased its license code from ODosta Store
    After OS activation, You can easily get windows 10 remote tech support to run all old programs and get windows 10 updates.
    You can upgrade your existing OS to windows 10, But you can face some technical issues, So I recommend you to have clean installation of Windows 7 or Windows 10 and activate it using legal license.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s