Last active
October 13, 2021 08:37
-
-
Save Anduin2017/d56eec2b390537be70ce39d2b43d8489 to your computer and use it in GitHub Desktop.
powerful pe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New-Item -Path "C:\Temp" -Type Directory | |
Dism /Mount-Image /ImageFile:"E:\sources\boot.wim" /Index:2 /MountDir:"C:\Temp" | |
$cabs = Get-ChildItem "*.cab" -Path "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs" | |
foreach($cab in $cabs) { | |
Dism /Add-Package /Image:"C:\Temp" /PackagePath:"$($cab.VersionInfo.FileName)" | |
} | |
$cabs = Get-ChildItem "*.cab" -Path "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us" | |
foreach($cab in $cabs) { | |
Dism /Add-Package /Image:"C:\Temp" /PackagePath:"$($cab.VersionInfo.FileName)" | |
} | |
Dism /Unmount-Image /MountDir:"C:\Temp" /Commit | |
Remove-Item -Path "C:\Temp" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment