Update Invoke-WinUtilISO.ps1 (#4314)

This commit is contained in:
Gabi
2026-04-07 18:46:11 +03:00
committed by GitHub
parent 786c7c677d
commit c24ea5e53b

View File

@@ -540,6 +540,9 @@ function Invoke-WinUtilISOExport {
if (-not $oscdimg) {
Write-Win11ISOLog "oscdimg.exe not found. Attempting to install via winget..."
try {
# First ensure winget is installed and operational
Install-WinUtilWinget
$winget = Get-Command winget -ErrorAction Stop
$result = & $winget install -e --id Microsoft.OSCDIMG --accept-package-agreements --accept-source-agreements 2>&1
Write-Win11ISOLog "winget output: $result"