Here
you are a guide for making windows images using sysprep. This can be useful if we have to
set up several computers that share the same/similar configuration.
For
getting the bloatware list we run next powershell command.
DISM /Online /Get-ProvisionedAppxPackages | select-string Packagename >> c:\Bloatware.txt
Once
we have the list we need to made up two Powershell scripts, once for removing the
provision of the apps and another one for uninstalling them.
The
first one should have next structure:
DISM
/Online /Remove-ProvisionedAppxPackage /PackageName: (Package name)
And
the second one this structure:
Get-AppxPackage
“(Package name)” | Remove-AppxPackage
Note:
If posible we have to actívate script execution on Powershell using next command
Set-ExecutionPolicy
Unrestricted.
Once
the scripts have been run we have to roll back the script execution policy using
next command.
Set-ExecutionPolicy
Default
This
command runs Sysprep and leave the computer
ready for creating the image.
We
pay attention to the drive letter assigned
and run following command.
dism
/capture-image /imagefile:c:\Install.wim /capturedir:( assigned letter):\
/name:"Windows 10 Pro" /Description:"Windows 10 Pro"
/compress:maximum /checkintegrity /verify /bootable
Once
the proccess has finished we split the “Install.wim” on order to be able of
using FAT32 formar.
Dism
/Split-Image /ImageFile:Install.wim /SWMFile:install.swm /FileSize:3800

Now we mount the ISO we have used for installing the VM and copy
everything on a folder (e.g. \myWindosImage) . This folder Will be use for
creating the final installation media.
We
replaced the original “Install.wim” o
“install.esd”, on folder “\myWindosImage \sources” for the files “Install.swm,
Install2.swm…” we created previously and finally we copy everything on a USB stick
with system file FAT32
Here you are the files I’ve used for this example.
Enjoy.
Culex.