Sysprep is Microsoft's System Preparation tool intended to duplicate, test and deliver new installations for the Windows operating system based on an established installation. It is a command-line tool that can be run manually or through a script.
Sysprep is typically used in situations. First, Sysprep can be used to duplicate an established Windows image across a large number of identical PCs. This is known as a build-to-plan or BTP image.
For example, a company that builds a high volume of identical PCs (such as Lenovo or Dell) might use Sysprep to establish a baseline Windows configuration. It could then test or update the baseline configuration and then prepare an identical installation image for distribution to PCs using the same hardware configuration or model. Similarly, any business might use Sysprep to establish a standard desktop image using a prescribed mix of drivers and applications and then use that image for all identical PCs provided to employees.
Second, Sysprep can use the same established Windows image as a foundation for many different PCs, adding desired drivers and applications for each unique system. A hardware provider could then create a distinctly different image for installation on that specific system. This is called a build-to-order or BTO image. For example, a small custom PC builder that creates new systems on request might modify a basic Windows image with hardware-specific drivers and customer-requested applications. With those, it could create a finalized Windows installation image for a particular machine.
The third use of Sysprep is audit mode, which actually customizes the Windows image. Audit mode allows the addition of applications, drivers and scripts. Audit mode also supports testing to ensure that the image will install properly and the system will operate as expected. Once the Windows image is customized and tested, the sysprep /oobe command tells Windows to start the installation on the next boot cycle.
Remember that Sysprep is designed only setting up new Windows installations -- it should never be used to change a Windows setup that is already deployed and running. In addition, Sysprep will request a product key when it runs, so it will be necessary to provide a valid key either in response to the query or through a file provided for unattended installation.