systeminfo
#> OS Name: Microsoft Windows Server 2019 Datacenter
#> OS Version: 10.0.17763 N/A Build 17763
-
Get an ISO with same version but lower patch than current image
-
Confirm iso version: Find Index of your product
dism /get-wiminfo /wimfile:d:\sources\install.wim
# Find matching index:
# Index : 1
# Name : Windows Server 2019 Datacenter
dism /get-wiminfo /wimfile:d:\sources\install.wim /index:1
# Find build:
# ServicePack Build : 379
- Export image
dism /export-image /sourceimagefile:d:\sources\install.wim /sourceindex:3 /destinationimagefile:c:\install-patched.wim /compress:max
- Mount the image for patching
mkdir c:\mount-wim
dism /mount-wim /wimfile:c:\install-patched.wim /index:1 /mountdir:c:\mount-wim
- Find service patch that defines your build number
dism /online /get-packages | findstr "557"
#> Package Identity : Package_for_RollupFix~31bf3856ad364e35~amd64~~17763.557.1.7
- Get KB number for the matching package name
dism /online /get-packageinfo /packagename:Package_for_RollupFix~31bf3856ad364e35~amd64~~17763.557.1.7 | findstr /I "kb"
#> Description : Fix for KB4503327
#> Support Information : http://support.microsoft.com/?kbid=4503327
- Find KB patch
Install-PackageProvider -Name NuGet -Force
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module kbupdate
get-kbupdate KB4503327 -Simple
- Extract cab from MSU
mkdir c:\patch-temp
get-kbupdate KB4503327 -Product "Windows Server 2019" | save-kbupdate -Path C:\patch-temp\
expand -f:* "C:\patch-temp\*.msu" c:\patch-temp
- Install patch to mounted image
dism /image:c:\mount-wim /add-package /packagepath:c:\patch-temp\Windows10.0-KB4503327-x64_PSFX.cab
- Install features from wim source
dism /online /enable-feature:AD-Domain-Services /source:c:\mount-wim\windows\winsxs
- Unmount and commit image
dism /unmount-wim /mountdir:c:\mount-wim /commit
Alternative: install from commited image directly
Install-WindowsFeature AD-Domain-Services,DNS -Source wim:c:\install-patched.wim:1