Skip to content

Instantly share code, notes, and snippets.

@OSDeploy
Created November 9, 2019 05:15
Show Gist options
  • Save OSDeploy/244cc03b0821afbf4a36f043c5884cf2 to your computer and use it in GitHub Desktop.
Save OSDeploy/244cc03b0821afbf4a36f043c5884cf2 to your computer and use it in GitHub Desktop.
$Wim = 'T:\install.wim'
$Mount = 'T:\Mount'
Mount-WindowsImage -ImagePath $Wim -Index 1 -Path $Mount | Out-Null
$Updates = Get-OSDSUS -Catalog OSDBuilder -UpdateArch x64 -UpdateBuild 1909 -UpdateOS "Windows 10" | Sort UpdateGroup -Descending
foreach ($Update in $Updates) {
Write-Verbose $Update.Title -Verbose
$UpdateFile = Save-OSDDownload -SourceUrl $Update.OriginUri -BitsTransfer -Verbose
Add-WindowsPackage -PackagePath $UpdateFile.FullName -Path $Mount -Verbose | Out-Null
}
Dismount-WindowsImage -Path $Mount -Save | Out-Null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment