File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
articles/virtual-machines/windows Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -107,8 +107,8 @@ Create a file named *windows.json* and paste the following content. Enter your o
107
107
"type" : " powershell" ,
108
108
"inline" : [
109
109
" Add-WindowsFeature Web-Server" ,
110
- " if( Test-Path $Env :SystemRoot\\ windows \\ system32 \\ Sysprep\\ unattend.xml ){ rm $Env:SystemRoot \\ windows \\ system32 \\ Sysprep \\ unattend.xml -Force} " ,
111
- " & $Env:SystemRoot \\ System32 \\ Sysprep \\ Sysprep.exe /oobe /generalize /shutdown /quiet "
110
+ " & $env :SystemRoot\\ System32 \\ Sysprep\\ Sysprep.exe /oobe /generalize /quiet /quit " ,
111
+ " 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 } } "
112
112
]
113
113
}]
114
114
}
You can’t perform that action at this time.
0 commit comments