Powershell_Scripts/Windows10/ApplyingWindowsUpdatetowim1703.ps1

13 lines
448 B
PowerShell
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

$UpdatesPath = "D:\TEMP\Update\*"
$MountPath = D:\TEMP\Mount\
$WimFile = D:\TEMP\Windows10_1703\sources\install.wim
DISM /Mount-Wim /WimFile:$WimFile /index:1 /Mountdir:$MountPath
$UpdateArray = Get-Item $UpdatesPath
ForEach ($Updates in $UpdateArray)
{
DISM /image:$MountPath /Add-Package /Packagepath:$Updates
Start-Sleep s 10
}
Write-Host "Updates Applied to WIM"
DISM /Unmount-Wim /Mountdir:$MountPath /commit
DISM /Cleanup-Wim