In this article we will show you how to use PowerShell and Windows System Preparation Tool to prepare a highly customized, personal Windows 10 install image. Before starting the installation, we need to make sure that our computer or virtual machine is not connected to network, because Windows 10 sysprep process will later fail if the PC was connected to Internet during the installation.
Sysprep Windows 10 Guide
You need to notice that we are using Build 9926 of Windows 10, so maybe this bug will be fixed in later builds. Let’s start to sysprep Windows 10.
Step 1 – Boot to Windows 10 Audit Mode
Start Windows installation normally. After reboot or two Windows is installed and process stops waiting your input. At this point we need to click on the Use express settings button. On next dialog you should not type a username, so don’t enter it.
Instead, press and hold down the CTRL+SHIFT+F3 keys combination. OS will now reboot to a special customization mode, the Windows 10 Audit Mode.
As no user profiles exist yet, Windows will use its built-in administrator account to sign in to Audit Mode. There is only one visible sign to mark that you have entered the Windows 10 Audit Mode desktop, the Sysprep dialog in the middle of the display. But we don’t need it right now, so click on the Cancel button.
Until now the installation was done without a network connection. So, you can connect your PC to network and Internet now.
Step 2 – Download and Install the Windows 10 ADK
What we are going to do next is to download and install the Windows 10 Assessment and Deployment Kit (ADK). First of all we need to install the Windows System Image Manager (WSIM), a part of the Windows ADK. You can download it from the links below:
Once it is downloaded, run the installation file. Here you don’t need to change the location, so click on Next. After that accept the license agreement and go ahead.
Now you need to select the features you want to install. In our case, we just need to install only WSIM, so put the mark only on Deployment Tools and click on Install.
Step 3 – Install OEM information and logo
It’s very easy to install OEM information and logo. You just need to create the .reg file and put information that you want. In our case we put in the following content:
Windows Registry Editor Version 5.00
“Model”=”Windows 10 Pro Image 10-1-2015”
“SupportHours”=”9am to 5pm ET M-F”
Now, you need to create the oem folder in C:\Windows and put there your logo. Once it is done, just open up the .reg file that we have created earlier and it will automatically add it to the registry.
Step 4 – Begin customization in Windows 10 Audit Mode
Now we will install all the applications and settings we would like to be present in the default user profile. Default profile is used as base profile when you later create users on your Windows PC.
To install default all user apps we will use OneGet, an integrated module of PowerShell. We cannot just go to the Start Menu and to the Search, because they are disabled in Windows 10 Audit Mode. So, we need to start PowerShell manually by browsing deep into Windows folder and starting it from there.
Go to C:\Windows\syswow64\WindowsPowerShell\v1.0 and then run powershell_ise application.
First thing we need to do is extend our rights to run scripts, in order to be able to install software from a package provider later on.
All we need is just type Set-Executionpolicy Unrestricted command.
Now we need to use the package manager or provider. The package manager we will use now is called Chocolatey. It needs unrestricted script execution policy, which is why we set it first thing after the PowerShell had started.
To add a provider we need to type Get-Packageprovider Chocolatey command.
Step 5 – Install the software you need
To install all the software that we need, we just have to use the Install-Package script. Let’s say we want to install Opera, Google Chrome, VLC, Adobe Reader, 7Zip and Zoomit.
To do it, you need to type Install-Package Opera, GoogleChrome, VLC, AdobeReader, 7Zip, Zoomit –Force command.
Step 6 – Uninstall built-in apps
Also you can uninstall built-in apps, but it’s really up to you. So, if you don’t want to uninstall built-in apps, just skip this step.
Paste the following scripts onto the PowerShell command line and press Enter.
Get-AppxPackage *3dbuilder* | Remove-AppxPackage Get-AppxPackage *windowsalarms* | Remove-AppxPackage Get-AppxPackage *Appconnector* | Remove-AppxPackage Get-AppxPackage *windowscalculator* | 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 *WindowsScan* | 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
Step 7 – Create Windows 10 Sysprep Answer file
Now we need to create an Answer File. An answer file is a set of instructions in an XML file. When sysprep is run, it reads these instructions, what changes it should make to the Windows image.
At first we need to create a catalog file. For that we need the install.wim file from a Windows install disk or ISO file.
Note. Windows 10 Build 9926 install.wim file for some reason cannot be used for the catalog file. This will be fixed in future builds, for sure. But for now we have a workaround.
To get an answer file for our Build 9926, at first we have to create the catalog using Windows 8.1 or Windows 10 Builds 9841, 9860 or 9879 install.wim file, and later edit the answer file.
Find the install.wim on any install media for above mentioned Windows versions and copy to the desktop of the PC you are using for this process now.
The install.wim can be found in Sources folder in any Windows install media. We are using the install.wim from Windows 8.1 Update 1.
Open Windows System Image Manager.
Location of the Windows System Image Manager is:
C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\WSIM\imgmgr.exe
Now, create a new answer file, and select the install.wim we just copied to the desktop.
Creating the catalog will take quite a long time.
Once it is done, we need to do the most important thing, set the CopyProfile value to TRUE. This setting is telling Sysprep to copy all our customizations to default user profile.
Once it is done, let the Windows SIM validate your answer file and check it for errors. Click on Tools -> Validate.
In our case it is nothing to be worried about, only warnings about some deprecated settings no longer possible to change, and notices that because we did not change some settings, they will be left out.
Now, we can save the answer file and name it as we want to. But the file extension must always be .xml. Save the answer file to root of any drive other than C:.
After that you can delete the install.wim and catalog files from the desktop.
Because the install.wim file that we have used is not belonging to the version of Windows we will Sysprep, the answer file must be edited. So, open it in Notepad.
Change the path to your Windows 10 install.wim file at the bottom of the answer file. In our case we need to change drive and Windows version to Windows 10 Pro. Now, save this file as CustomImage.xml on the drive D:.
Step 8 – Run Sysprep in Windows 10
Finally let’s run sysprep. Open up Command Prompt as admin.
Go to Sysprep folder and type in the following command:
Sysprep.exe /generalize /oobe /shutdown /unattend:D:\CustomImage.xml
In our case the answer file is on the root of the drive D:. Change the command according to where your answer file is located.
The system will now shutdown and is ready to be imaged using your choice of imaging software.
When the computer has booted to imaging and recovery tool, create a system image according to instructions for the program you are using. Once it is done, shutdown the computer.
You have created a generalized, highly customized Windows install image which can be restored to any computer instead of installing. Restoring takes only half of the time needed for installation.
Start PC normally to finalize the installation.
The Welcome phase first boot is a bit different in a Sysprepped Windows. You will be asked to enter the product key. This is of course not necessary, you can skip it.
Now, create a local account. You can later change it to a Microsoft Account.
Finally, we did it. After installation you will see that all customizations are there, all software you installed in Audit Mode are there as well.
That’s all. If you have any questions about this Sysprep Windows 10 tutorial, you are free to leave them in the comments section below.