Skip to content

Instantly share code, notes, and snippets.

@vintagesucks
Forked from JunielKatarn/mergeswm.ps1
Created August 30, 2022 17:38
Show Gist options
  • Select an option

  • Save vintagesucks/187e7c0b4125d534af58c558505067d9 to your computer and use it in GitHub Desktop.

Select an option

Save vintagesucks/187e7c0b4125d534af58c558505067d9 to your computer and use it in GitHub Desktop.
Correct way to merge SWM files into a WIM file. TechNet documentation is wrong for this command.
# Taken from https://technet.microsoft.com/en-us/library/hh825258.aspx
Param
(
$ImageName
)
dism /Export-Image `
/SourceImageFile:${ImageName}.swm `
/SWMFile:${ImageName}*.swm `
/SourceIndex:1 `
/DestinationImageFile:${ImageName}.wim `
/CheckIntegrity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment