Windows : make a sysprep

Presentation

Sysprep is a Windows utility that allows you to prepare a system for deployment.

This operation generates a new SID when you install Windows.

On the same Active Directory domain, there must be Windows with the SID.

To capture an image with WDS, the installation must have been prepared with a sysprep.

Realize the sysprep

1. Open a command prompt as an administrator.

2. Enter the following command line:

C:\Windows\System32\sysprep\sysprep.exe /oobe /generalize /shutdown

Explanation of the command :

C:\Windows\System32\sysprep\sysprep.exe : running the sysprep.exe utility

/oobe : Out-Of-Box Experience launches the Windows customization sequence.

/generalize : allows Windows to be deployed on other types of hardware

/shutdown : turn off the computer

Additional information about sysprep

Since Windows 8, it is possible to use 8 times the sysprep on the same image, after this number passed, it is necessary to redo an image.

For earlier versions, it is possible to provide a response file with the SkipRearm parameter to reset the activation number.

Create an Unattend.xml file in the C: \ Windows \ System32 \ Sysprep folder and copy the contents below.

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="generalize">
        <component name="Microsoft-Windows-Security-Licensing-SLC" 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">
            <SkipRearm>1</SkipRearm>
        </component>
        <component name="Microsoft-Windows-Security-Licensing-SLC" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <SkipRearm>1</SkipRearm>
        </component>
    </settings>
    <cpi:offlineImage cpi:source="catalog://poin18/cd$sources/install_windows 7 professional.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>

Run the incoming sysprep the following line:

C:\Windows\System32\sysprep\sysprep.exe /unattend:C:\Windows\System32\sysprep\Unattend.xml /oobe /generalize /shutdown

When starting your Windows, do not load the Windows starts otherwise the volume will no longer be considered “sysprepe”.

Conclusion

If you want to clone your posts, it is mandatory to make a sysprep of your system.




Leave a Comment