No edit summary |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
==Sysprep== | ==Sysprep== | ||
Microsoft guide: [https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/sysprep--system-preparation--overview?view=windows-11 MS Learn] | |||
To use sysprep open CMD and go to the location of the sysprep EXE: | To use sysprep open CMD and go to the location of the sysprep EXE: | ||
| Line 7: | Line 9: | ||
Then you can uses the /generalize command and select the options from the options box that appears or use the following command to ready the VM to be shutdown before cloning the VM:<syntaxhighlight lang="powershell"> | Then you can uses the /generalize command and select the options from the options box that appears or use the following command to ready the VM to be shutdown before cloning the VM:<syntaxhighlight lang="powershell"> | ||
%WINDIR%\system32\sysprep\sysprep.exe /generalize /shutdown /oobe | %WINDIR%\system32\sysprep\sysprep.exe /generalize /shutdown /oobe | ||
</syntaxhighlight> | |||
== Issues with sysprep == | |||
If sysprep does not function then you may need to check errors in the log files: c:\windows\system32\sysprep\panther\setupact or setuperr | |||
Usually the issues are because some applications are installed per user. to identify this check the logs then use powershell to find the installs:<syntaxhighlight lang="powershell"> | |||
Get-AppxPackage -AllUsers #get the appx package and look for the package that is shown in the sysprep logs | |||
Get-AppxPackage -AllUsers -Name <name of package> | Remove-AppxPackage -AllUsers #remove the package for all users | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 12:27, 2 June 2025
Sysprep
Microsoft guide: MS Learn
To use sysprep open CMD and go to the location of the sysprep EXE:
%WINDIR%\system32\sysprep\sysprep.exe
Then you can uses the /generalize command and select the options from the options box that appears or use the following command to ready the VM to be shutdown before cloning the VM:
%WINDIR%\system32\sysprep\sysprep.exe /generalize /shutdown /oobe
Issues with sysprep
If sysprep does not function then you may need to check errors in the log files: c:\windows\system32\sysprep\panther\setupact or setuperr
Usually the issues are because some applications are installed per user. to identify this check the logs then use powershell to find the installs:
Get-AppxPackage -AllUsers #get the appx package and look for the package that is shown in the sysprep logs
Get-AppxPackage -AllUsers -Name <name of package> | Remove-AppxPackage -AllUsers #remove the package for all users