Many organizations want to automate as much of the imaging process for new computers as possible. Often this involves installing applications via System Center, Group Policy, MDT, or a third-party alternative. Unfortunately, there are instances in which this approach is not feasible. An example might be deploying workstations to a branch office where it is not practical to stream the install across a WAN connection to a central file server at a datacentre.
To be clear, the recommended best practice is to leave your image as plain as possible. This makes future management significantly simpler — uninstalling an application that is included in a custom Windows image is never fun, nor is keeping an image up to date with every application version release.
For this tutorial, I will be installing the App-V Client on Windows 10. You may choose to customize the image by installing applications, making registry tweaks in the HKLM hive, or any other method that you see fit. You can also use a different operating system; the steps are nearly identical.
Begin with a clean install of Windows 10. To get around the limit of only being able to sysprep a Windows OS three times, install the OS in a virtual machine and take a snapshot of the clean install. You can then restore to this pristine pre-sysprep state after sysprepping.
After completing the out-of-box experience (OOBE), install your applications and make changes to the OS that you want to deploy. Do not join this machine to your domain.
After you are finished modifying the operating system, open an administrative instance of PowerShell. Change to the C:\Windows\System32\Sysprep directory and run Sysprep with the generalize, oobe, and shutdown parameters.
On another VM, download and install the Windows 10 ADK. From the start menu, find Windows Kits and run the Deployment and Imaging Tools Environment as administrator.
Next, mount the VHD file from the sysprepped machine to the Windows ADK machine. Depending on your hypervisor the steps to do this will vary. In Hyper-V, configure the VM settings on the ADK VM and add the existing VHD from the sysprepped VM. It will appear in File Explorer with another drive letter.
From the Deployment and Imaging Tools command prompt, run the following commands, assuming H: is the disk to be imaged and E:\Windows10Appv.WIM is the image file to be created.
After ImageX is finished creating the image of your disk, you will find the WIM file in the E:\ directory.
Check back for a tutorial detailing the process of image deployment!