Windows 10 Imaging, Continued

Hey, but this time it isn’t a rant!

That’s because I’ve gotten somewhere!

Where we left off last time, I was having problems with the damn thing failing after the last SysPrep phase, after customizing the image.

We learned something and we have a solution and a working dealie!

Without further delay, here’s what I did.

  1. Install Windows 10 (Version you’re allowed to use, in our case Professional) with a USB drive created from the USB Download Utility from Microsoft.
    1. Boot off the USB tool.
    2. Select I don’t have a product key (even if you have one, you don’t need to enter it here).
    3. Select the appropriate version of Windows 10 from the list (in our case, Professional)
    4. Create a single drive partition and install Windows to it.
  2. Customize the installation first
    1. Press Ctrl + Shift + F3 to enter Audit mode as soon as you see the Express Setting screen.
      1. Your system will reboot and login as an Audit mode Administrator account.
      2. All steps below here are largely optional, this is exactly what we did for our imaging though.
    2. Rename C drive as appropriate.
    3. Import OEM Registry Keys
      1. Create a registry key (OEM.reg) with the following information:
        1. Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation]
          “Logo”=”Path To Some BMP File on the Local Disk eg: C:\\Windows\\OEM\Logo.bmp”
          “Manufacturer”=”Manufacturer Name”
          “Model”=”Model Number”
          “SupportHours”=”Hours of Operation”
          “SupportURL”=”Support URL”
      2. Import the registry key.
      3. Reboot and verify that the changes took.
    4. Remove Un-Needed Apps from App Store
      1. Start -> Run -> powershell_ise (as Administrator)
      2. Execute Following Commands
        1. Set-ExecutionPolicy Unrestricted
          Get-PackageProvider Chocolatey
          Get-AppxPackage *3dbuilder* | Remove-AppxPackage
          Get-AppxPackage *windowsalarms* | Remove-AppxPackage
          Get-AppxPackage *Appconnector* | Remove-AppxPackage
          Get-AppxPackage *windowscommunicationsapps* | Remove-AppxPackage
          Get-AppxPackage *windowscamera* | Remove-AppxPackage
          Get-AppxPackage *CandyCrushSaga* | Remove-AppxPackage
          Get-AppxPackage *officehub* | Remove-AppxPackage
          Get-AppxPackage *skypeapp* | Remove-AppxPackage
          Get-AppxPackage *getstarted* | Remove-AppxPackage
          Get-AppxPackage *zunemusic* | Remove-AppxPackage
          Get-AppxPackage *windowsmaps* | Remove-AppxPackage
          Get-AppxPackage *Messaging* | Remove-AppxPackage
          Get-AppxPackage *solitairecollection* | Remove-AppxPackage
          Get-AppxPackage *ConnectivityStore* | Remove-AppxPackage
          Get-AppxPackage *bingfinance* | Remove-AppxPackage
          Get-AppxPackage *zunevideo* | Remove-AppxPackage
          Get-AppxPackage *bingnews* | Remove-AppxPackage
          Get-AppxPackage *onenote* | Remove-AppxPackage
          Get-AppxPackage *people* | Remove-AppxPackage
          Get-AppxPackage *CommsPhone* | Remove-AppxPackage
          Get-AppxPackage *windowsphone* | Remove-AppxPackage
          Get-AppxPackage *photos* | Remove-AppxPackage
          Get-AppxPackage *bingsports* | Remove-AppxPackage
          Get-AppxPackage *windowsstore* | Remove-AppxPackage
          Get-AppxPackage *Office.Sway* | Remove-AppxPackage
          Get-AppxPackage *Twitter* | Remove-AppxPackage
          Get-AppxPackage *soundrecorder* | Remove-AppxPackage
          Get-AppxPackage *bingweather* | Remove-AppxPackage
          Get-AppxPackage *xboxapp* | Remove-AppxPackage
          Get-AppxPackage *XboxOneSmartGlass* | Remove-AppxPackage
          Set-ExecutionPolicy Restricted
      3. Exit out of powershell_ise
      4. Be sure to right-click and remove icons from the start menu for all the things you removed, or remove all of them like we did.
    5. Disable Cortana
      1. Cortana can be partially disabled by clicking on the search icon at the bottom left of Windows 10, clicking on the gear icon in the left-hand bar and then clicking “Off” under the Cortana web searches section.
        Hide Cortana
      2. Right Click Task Bar -> Search -> Hidden.
    6. Disable OneDrive
    7. Set Background: Solid Black
    8. Control Panel
      1. Set View to Small Icons
      2. Set UAC to Never Notify
    9. Task Bar
      1. Always Show All Notification Icons
    10. Folder Options
      1. Set File Explorer to open to “This PC”
      2. Disable/Remove All Quick Access options.
      3. Enable Show Empty Drives
    11. Disable Hibernation Mode
      1. Start -> Run -> CMD
      2. powercfg -h off
    12. Power Plan Options
      1. Modify High-Performance Plan
        1. Monitor Off: 2 Hours
        2. Drive Off: 4 Hours
      2. Set High-Performance Plan
      3. These settings will be made irrelevant by PowerSave Agent but we add them as a backup anyways.
    13. Add *://*.yourdomain.com to Trusted Internet Sites
      1. This is a holdover from Windows 7, I don’t like it, but it’s in my boss’s imaging notes so I include it here too until I can get rid of it.
    14. Install other packages
      1. CutePDF
      2. Altiris AClient
    15. Add Folders
      1. C:\Log
        1. Logon script logging folders.
      2. C:\MSI
        1. Where Altiris sends files for package deployment.
    16. Add Scripts
      1. Add CACLS Script to MSI folder
    17. Run a SysPrep
      1. Start -> Run -> CMD
      2. cd \Windows\System32
      3. Sysprep /audit /generalize /unattend:<PathToUnattend.XML> /reboot
      4. The Unattend File we need here is super simple:
        1. <?xml version="1.0" encoding="utf-8"?>
          <unattend xmlns="urn:schemas-microsoft-com:unattend">
              <settings pass="specialize">
                  <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                      <CopyProfile>true</CopyProfile>
                  </component>
              </settings>
          </unattend>
    18. Run Windows Updates.
    19. Reboot following Windows Updates.
    20. Check Windows Updates again.
    21. Reboot again, regardless of what the check finds.
    22. Run a (different) SysPrep
      1. Start -> Run -> CMD
      2. cd \Windows\System32
      3. Sysprep /oobe /generalize /unattend:<PathToUnattend.XML> /shutdown
      4. The Unattend File we need here is the same one as above.
    23. Capture Image via WDS.

Holy cow.

It worked.  The image captured.  I re-deployed it to the same PC: it worked, no errors.  I re-deployed it to a different PC: it worked, again! 😀

*boogies*

-M, out.

Leave a Reply