PowerShell script to inject files on WIM image

Use « WSUS Offline » to scan and download missed KB. download here

Create a folder d:\MAJWIM to put the script dans .\WSUSOffline\ to put the tool.

Launch the script and be happy.

 

$UpdatesPath = "D:\MAJwm\WSUSOffline\client\w61-x64\glb"
$MountPath = "D:\MAJwim\mount"
$WimFile = "D:\MAJwim\sources\install.wim"

DISM /Mount-Wim /WimFile:$WimFile /index:1 /Mountdir:$MountPath

DISM /image:$MountPath /Add-Package /Packagepath:$UpdatesPath

Write-Host "Updates Applied to WIM"
DISM /Unmount-Wim /Mountdir:$MountPath /commit
DISM /Cleanup-Wim

One thought on “PowerShell script to inject files on WIM image”

Laisser un commentaire