New
#1
Update Windows 10 image with latest updates
As title says, i am trying find a way to update a Windows 10 image with the latest updates.
I currently use a script like this:
And while it works it still seems there's some updates missing when i install it (i of course change the name of the wim file so it's replacing the install.wim)Code:
- $mounted = (Get-Item "./Win10_21H1_EnglishInternational_x64.iso" | Mount-DiskImage -PassThru)
- $drive = $mounted | Get-Volume
- #Copy-Item -Recurse -Path "$($drive.DriveLetter):/" -Destination "./$($drive.FileSystemLabel)"
- Mount-WindowsImage -ImagePath "./$($drive.FileSystemLabel)/sources/install.wim" -Path "./mnt" -Name "Windows 10 Pro"
- $updates = Get-Item "./updates/w10/*"
- foreach ($item in $updates) {
- Add-WindowsPackage -PackagePath $item -Path "./mnt"
- }
- DISM /Cleanup-Image /Image:"./mnt" /StartComponentCleanup /ResetBase
- Dismount-WindowsImage -Path "./mnt" -Save
- Export-WindowsImage -ImagePath "./$($drive.FileSystemLabel)/sources/installcustom.wim" -Name "Windows 10 Pro" -CheckIntegrity
I grab the latest updates withand grab the latest cumulative and .NET Framework update.Code:get-mscatalogupdate "windows 10 x64 21h1 cumulative"
Am i missing something?
Should i use Dynamic Updates instead somehow? (looking at: https://docs.microsoft.com/en-us/win...dynamic-update)