I have cloned and deployed several PCs with similar hardware as they are of the same model.
The steps are as follows:
Computer A:
- Install Windows
- Install applications/drivers/updates
- Capture Image Version #1
- Run sysprep
- Join domain
- Activate windows and office
Computer B, C and so on:
- Deploy Image Version #1 to a machine
- Run sysprep
- Join domain
- Activate windows and office
Run the following bat file when sysprep
@ECHO OFF
reg add "HKLM\SYSTEM\Setup\Status\Sysprepstatus" /v CleanupState /t REG_DWORD /d 00000002 /F
reg add "HKLM\SYSTEM\Setup\Status\Sysprepstatus" /v GeneralizationState /t REG_DWORD /d 00000007 /F
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v SkipRearm /t REG_DWORD /d 00000001
msdtc -uninstall
timeout 120
msdtc -install
timeout 120
rmdir /Q /S "C:\Windows\System32\Sysprep\Panther"
del /Q "C:\Windows\System32\Sysprep\Sysprep_succeeded.tag "
ECHO Beginning Sysprep. The system will shutdown when complete.
"C:\Windows\System32\Sysprep\Sysprep.exe" /oobe /generalize /shutdown
I have now realised that windows and office fails to activate on the kms server by itself. Any idea on how I can remedy the problem. Thanks.
What is the difference if I sysprep /generalize with SkipRearm=1 and sysprep /generalize with SkipRearm=0?
Note: this is based on stuff I have read, I don't have practical experiance.
"rearming" resets the product activation system. The installation will get a new ID for activation, and the activation status will return to non-activated at the start of the grace period.
There is a limit to the number of times an installation can be rearmed to prevent people from using the feature to extend the activation grace period forever.
By default sysprep will perform a rearm, if you want to prevent this then you set the "SkipRearm=1" registry value. You can also rearm manually with "slmgr /rearm"
Normally when imaging you want to rearm. This ensures that the activation on the new machine starts from a clean slate and the kms sees all your machines as different systems. If you don't rearm then the kms will be unable to tell the difference between all of your machines. So if you build a network full of machines, image all of them without rearming then the kms server will think they are all the same machine and hence will never reach it's minimum machine count.
The exception is when you have a workflow like
In this case you don't want to rearm when making images you will later build on, otherwise after a few iterations you will reach the maximum rearm count.