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.
- 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.
- Boot off the USB tool.
- Select I don’t have a product key (even if you have one, you don’t need to enter it here).
- Select the appropriate version of Windows 10 from the list (in our case, Professional)
- Create a single drive partition and install Windows to it.
- Customize the installation first
- Press Ctrl + Shift + F3 to enter Audit mode as soon as you see the Express Setting screen.
- Your system will reboot and login as an Audit mode Administrator account.
- All steps below here are largely optional, this is exactly what we did for our imaging though.
- Rename C drive as appropriate.
- Import OEM Registry Keys
- Create a registry key (OEM.reg) with the following information:
- 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”
- Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation]
- Import the registry key.
- Reboot and verify that the changes took.
- Create a registry key (OEM.reg) with the following information:
- Remove Un-Needed Apps from App Store
- Start -> Run -> powershell_ise (as Administrator)
- Execute Following Commands
- 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
- Set-ExecutionPolicy Unrestricted
- Exit out of powershell_ise
- 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.
- Disable Cortana
- 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 - Right Click Task Bar -> Search -> Hidden.
- 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.
- Disable OneDrive
- Set Background: Solid Black
- Control Panel
- Set View to Small Icons
- Set UAC to Never Notify
- Task Bar
- Always Show All Notification Icons
- Folder Options
- Set File Explorer to open to “This PC”
- Disable/Remove All Quick Access options.
- Enable Show Empty Drives
- Disable Hibernation Mode
- Start -> Run -> CMD
- powercfg -h off
- Power Plan Options
- Modify High-Performance Plan
- Monitor Off: 2 Hours
- Drive Off: 4 Hours
- Set High-Performance Plan
- These settings will be made irrelevant by PowerSave Agent but we add them as a backup anyways.
- Modify High-Performance Plan
- Add *://*.yourdomain.com to Trusted Internet Sites
- 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.
- Install other packages
- CutePDF
- Altiris AClient
- Add Folders
- C:\Log
- Logon script logging folders.
- C:\MSI
- Where Altiris sends files for package deployment.
- C:\Log
- Add Scripts
- Add CACLS Script to MSI folder
- Run a SysPrep
- Start -> Run -> CMD
- cd \Windows\System32
- Sysprep /audit /generalize /unattend:<PathToUnattend.XML> /reboot
- The Unattend File we need here is super simple:
-
<?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>
-
- Run Windows Updates.
- Reboot following Windows Updates.
- Check Windows Updates again.
- Reboot again, regardless of what the check finds.
- Run a (different) SysPrep
- Start -> Run -> CMD
- cd \Windows\System32
- Sysprep /oobe /generalize /unattend:<PathToUnattend.XML> /shutdown
- The Unattend File we need here is the same one as above.
- Capture Image via WDS.
- Press Ctrl + Shift + F3 to enter Audit mode as soon as you see the Express Setting screen.
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.