From 0ecbd128e3d289b64f8fa95d343091f0c6aae0dd Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev <48208649+miketimofeev@users.noreply.github.com> Date: Fri, 25 Feb 2022 00:23:26 +0300 Subject: [PATCH] Use mode:vm in sysprep to skip modules installation (#5136) --- images/win/windows2022.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/windows2022.json b/images/win/windows2022.json index 9a21b4c2..db33e7b0 100644 --- a/images/win/windows2022.json +++ b/images/win/windows2022.json @@ -317,7 +317,7 @@ "type": "powershell", "inline": [ "if( Test-Path $Env:SystemRoot\\System32\\Sysprep\\unattend.xml ){ rm $Env:SystemRoot\\System32\\Sysprep\\unattend.xml -Force}", - "& $env:SystemRoot\\System32\\Sysprep\\Sysprep.exe /oobe /generalize /quiet /quit", + "& $env:SystemRoot\\System32\\Sysprep\\Sysprep.exe /oobe /generalize /mode:vm /quiet /quit", "while($true) { $imageState = Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\State | Select ImageState; if($imageState.ImageState -ne 'IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE') { Write-Output $imageState.ImageState; Start-Sleep -s 10 } else { break } }" ] }