From 1c4906df3ee0ceaa6f057881eea5b752d6fdc9d7 Mon Sep 17 00:00:00 2001 From: francescosandri Date: Fri, 12 Sep 2025 09:13:27 +0200 Subject: [PATCH 1/3] 24.10.8.2 Added Windows 11 ISO naming support in New-OSDBuilderISO.ps1 --- Public/New-OSDBuilderISO.ps1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Public/New-OSDBuilderISO.ps1 b/Public/New-OSDBuilderISO.ps1 index 16a908b..a867bd0 100644 --- a/Public/New-OSDBuilderISO.ps1 +++ b/Public/New-OSDBuilderISO.ps1 @@ -139,7 +139,10 @@ function New-OSDBuilderISO { $OSImageName = "Server $($Media.Version)" $ISOFile = "$ISODestinationFolder\Server $($Media.Version).iso" } else { - if ($Media.MajorVersion -eq 10) { + if ($Media.Build.SubString(0,1) -eq 2) { + $OSImageName = "Win11 $($Media.Arch) $($Media.ReleaseId) $($Media.UBR)" + $ISOFile = "$ISODestinationFolder\Win11 $($Media.Arch) $($Media.ReleaseId) $($Media.UBR).iso" + } elseif ($Media.Build.SubString(0,1) -eq 1) { $OSImageName = "Win10 $($Media.Arch) $($Media.ReleaseId) $($Media.UBR)" $ISOFile = "$ISODestinationFolder\Win10 $($Media.Arch) $($Media.ReleaseId) $($Media.UBR).iso" } elseif ($Media.Version -like "6.3.*") { @@ -225,4 +228,4 @@ function New-OSDBuilderISO { return $results } } -} \ No newline at end of file +} From 9df11764eb900164b7558d22f1d5c698dd2a0161 Mon Sep 17 00:00:00 2001 From: francescosandri Date: Mon, 30 Mar 2026 11:10:03 +0200 Subject: [PATCH 2/3] Modified New-OSBuildMultiLang adapted Index rename --- .gitignore | 3 ++ Public/New-OSBuildMultiLang.ps1 | 89 ++++++++++++++++++++++----------- Public/New-OSDBuilderISO.ps1 | 2 +- README.md | 10 +--- 4 files changed, 65 insertions(+), 39 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4cc57e1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +PSGetModuleInfo.xml +README.md +README.md diff --git a/Public/New-OSBuildMultiLang.ps1 b/Public/New-OSBuildMultiLang.ps1 index 72ae85b..42623fc 100644 --- a/Public/New-OSBuildMultiLang.ps1 +++ b/Public/New-OSBuildMultiLang.ps1 @@ -45,7 +45,7 @@ function New-OSBuildMultiLang { Write-Warning "OSBuild MultiLang will take an OSBuild with Language Packs" Write-Warning "and create a new OSBuild with multiple Indexes" Write-Warning "Each Index will have a Language set as the System UI" - Write-Warning "This process will take some time as the LCU will be reapplied" + # Write-Warning "This process will take some time as the DotNet & LCU will be reapplied" #================================================= # Get OSBuilds with Multi Lang @@ -98,7 +98,7 @@ function New-OSBuildMultiLang { $OSBuild = $($LangMultiWindowsImage.Build) $OSInstallationType = $($LangMultiWindowsImage.InstallationType) $OSMajorVersion = $($LangMultiWindowsImage.MajorVersion) - $WindowsImageMediaName = $($LangMultiWindowsImage.MediaName) + $WindowsImageMediaName = $($LangMultiWindowsImage.ImageName) $OSVersion = $($LangMultiWindowsImage.Version) if ($OSArchitecture -eq '0') {$OSArchitecture = 'x86'} @@ -123,6 +123,14 @@ function New-OSBuildMultiLang { } } #================================================= + # OSDUpdateDotNet + #================================================= + $OSDUpdateDotNet = $AllOSDUpdates + $OSDUpdateDotNet = $OSDUpdateDotNet | Where-Object {$_.UpdateArch -eq $OSArchitecture} + $OSDUpdateDotNet = $OSDUpdateDotNet | Where-Object {$_.UpdateOS -eq $UpdateOS} + $OSDUpdateDotNet = $OSDUpdateDotNet | Where-Object {($_.UpdateBuild -eq $ReleaseId) -or ($_.UpdateBuild -eq '')} + $OSDUpdateDotNet = $OSDUpdateDotNet | Where-Object {$_.UpdateGroup -like 'DotNet*'} + #================================================= # OSDUpdateLCU #================================================= $OSDUpdateLCU = $AllOSDUpdates @@ -149,34 +157,55 @@ function New-OSBuildMultiLang { # Process Indexes #================================================= foreach ($LangMultiLanguage in $LangMultiLanguages) { - if ($LangMultiLanguage -eq $LangMultiDefaultName) { - #================================================= - # Header - #================================================= - Show-ActionTime - Write-Host -ForegroundColor Green "$($Media.ImageName) $LangMultiDefaultName is already processed as Index 1" - } else { - Show-ActionTime - Write-Host -ForegroundColor Green "Processing $($Media.ImageName) $LangMultiLanguage" - - Write-Host "Dism /Image:"$MountDirectory" /Set-AllIntl:$LangMultiLanguage" -ForegroundColor Cyan - Dism /Image:"$MountDirectory" /Set-AllIntl:$LangMultiLanguage - - Write-Host "Dism /Image:"$MountDirectory" /Get-Intl" -ForegroundColor Cyan - Dism /Image:"$MountDirectory" /Get-Intl - - Write-Warning "Waiting 10 seconds for processes to complete before applying LCU ..." - Start-Sleep -Seconds 10 - Update-CumulativeOS -Force - - Write-Warning "Waiting 10 seconds for processes to complete before Save-WindowsImage ..." - Start-Sleep -Seconds 10 - Save-WindowsImage -Path "$MountDirectory" | Out-Null - - Write-Warning "Waiting 10 seconds for processes to complete before Export-WindowsImage ..." - Start-Sleep -Seconds 10 - Export-WindowsImage -SourceImagePath "$TempInstallWim" -SourceIndex 1 -DestinationImagePath "$DestinationFullName\OS\Sources\install.wim" -DestinationName "$($Media.ImageName) $LangMultiLanguage" | Out-Null - } + Show-ActionTime + Write-Host -ForegroundColor Green "Processing $($Media.ImageName) $LangMultiLanguage" + + Write-Host "Dism /Image:"$MountDirectory" /Set-AllIntl:$LangMultiLanguage" -ForegroundColor Cyan + Dism /Image:"$MountDirectory" /Set-AllIntl:$LangMultiLanguage + + Write-Host "Dism /Image:"$MountDirectory" /Get-Intl" -ForegroundColor Cyan + Dism /Image:"$MountDirectory" /Get-Intl + + # Write-Warning "Waiting 10 seconds for processes to complete before applying DotNet ..." + # Start-Sleep -Seconds 10 + # Update-DotNetOS -Force + + # Write-Warning "Waiting 10 seconds for processes to complete before applying LCU ..." + # Start-Sleep -Seconds 10 + # Update-CumulativeOS -Force + + Write-Warning "Waiting 10 seconds for processes to complete before Save-WindowsImage ..." + Start-Sleep -Seconds 10 + Save-WindowsImage -Path "$MountDirectory" | Out-Null + + Write-Warning "Waiting 10 seconds for processes to complete before Export-WindowsImage ..." + Start-Sleep -Seconds 10 + Export-WindowsImage -SourceImagePath "$TempInstallWim" -SourceIndex 1 -DestinationImagePath "$DestinationFullName\OS\Sources\install.wim" -DestinationName "$($Media.ImageName) $LangMultiLanguage" | Out-Null + } + #================================================= + # Index Rename + #================================================= + # Retrieve index numbers + $ImageCount = (wimlib-imagex info "$DestinationFullName\OS\Sources\install.wim" | Select-String "Image Count:" | ForEach-Object { $_ -replace "Image Count:\s+", "" }).Trim() + + for ($Index = 1; $Index -le [int]$ImageCount; $Index++) { + # retrieve wiminfo + $WimInfo = wimlib-imagex info "$DestinationFullName\OS\Sources\install.wim" $Index + + # Extract "Default Language" + $DefaultLang = ($WimInfo | Select-String "Default Language:" | ForEach-Object { $_ -replace "Default Language:\s+", "" }).Trim() + + # Extact "Display Name" + $DisplayName = ($WimInfo | Select-String "Display Name:" | ForEach-Object { $_ -replace "Display Name:\s+", "" }).Trim() + + # Extract "Display Description" + $DisplayDescription = ($WimInfo | Select-String "Display Description:" | ForEach-Object { $_ -replace "Display Description:\s+", "" }).Trim() + + $DisplayName = "$DisplayName $DefaultLang" + $DisplayDescription = "$DisplayDescription $DefaultLang" + + # Set new Display Name and Display Description + wimlib-imagex info "$DestinationFullName\OS\Sources\install.wim" $Index --image-property DISPLAYNAME="$DisplayName" --image-property DISPLAYDESCRIPTION="$DisplayDescription" } #================================================= # Cleanup diff --git a/Public/New-OSDBuilderISO.ps1 b/Public/New-OSDBuilderISO.ps1 index a867bd0..837ff7a 100644 --- a/Public/New-OSDBuilderISO.ps1 +++ b/Public/New-OSDBuilderISO.ps1 @@ -228,4 +228,4 @@ function New-OSDBuilderISO { return $results } } -} +} \ No newline at end of file diff --git a/README.md b/README.md index 633ce31..9ceb6b7 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,3 @@ # OSDBuilder - -January 21, 2025 -OSDBuilder is not working due to updates not being downloaded or installed. Unfortunately, I'm unable to resolve this and do not have an ETA. - -Feel free to post an Issue -https://github.com/OSDeploy/OSDBuilder/issues - -David Segura +PowerShell Module +https://osdbuilder.osdeploy.com \ No newline at end of file From 0d97d6ba5bc97d4d69c84e13a318aa1a96a43d31 Mon Sep 17 00:00:00 2001 From: francescosandri Date: Tue, 31 Mar 2026 12:42:26 +0200 Subject: [PATCH 3/3] Update New-OSBuildMultiLang.ps1 Added wimlib support for index renaming --- Public/New-OSBuildMultiLang.ps1 | 62 ++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/Public/New-OSBuildMultiLang.ps1 b/Public/New-OSBuildMultiLang.ps1 index 42623fc..4ddb9d6 100644 --- a/Public/New-OSBuildMultiLang.ps1 +++ b/Public/New-OSBuildMultiLang.ps1 @@ -157,30 +157,38 @@ function New-OSBuildMultiLang { # Process Indexes #================================================= foreach ($LangMultiLanguage in $LangMultiLanguages) { - Show-ActionTime - Write-Host -ForegroundColor Green "Processing $($Media.ImageName) $LangMultiLanguage" - - Write-Host "Dism /Image:"$MountDirectory" /Set-AllIntl:$LangMultiLanguage" -ForegroundColor Cyan - Dism /Image:"$MountDirectory" /Set-AllIntl:$LangMultiLanguage - - Write-Host "Dism /Image:"$MountDirectory" /Get-Intl" -ForegroundColor Cyan - Dism /Image:"$MountDirectory" /Get-Intl - - # Write-Warning "Waiting 10 seconds for processes to complete before applying DotNet ..." - # Start-Sleep -Seconds 10 - # Update-DotNetOS -Force - - # Write-Warning "Waiting 10 seconds for processes to complete before applying LCU ..." - # Start-Sleep -Seconds 10 - # Update-CumulativeOS -Force - - Write-Warning "Waiting 10 seconds for processes to complete before Save-WindowsImage ..." - Start-Sleep -Seconds 10 - Save-WindowsImage -Path "$MountDirectory" | Out-Null - - Write-Warning "Waiting 10 seconds for processes to complete before Export-WindowsImage ..." - Start-Sleep -Seconds 10 - Export-WindowsImage -SourceImagePath "$TempInstallWim" -SourceIndex 1 -DestinationImagePath "$DestinationFullName\OS\Sources\install.wim" -DestinationName "$($Media.ImageName) $LangMultiLanguage" | Out-Null + if ($LangMultiLanguage -eq $LangMultiDefaultName) { + #================================================= + # Header + #================================================= + Show-ActionTime + Write-Host -ForegroundColor Green "$($Media.ImageName) $LangMultiDefaultName is already processed as Index 1" + } else { + Show-ActionTime + Write-Host -ForegroundColor Green "Processing $($Media.ImageName) $LangMultiLanguage" + + Write-Host "Dism /Image:"$MountDirectory" /Set-AllIntl:$LangMultiLanguage" -ForegroundColor Cyan + Dism /Image:"$MountDirectory" /Set-AllIntl:$LangMultiLanguage + + Write-Host "Dism /Image:"$MountDirectory" /Get-Intl" -ForegroundColor Cyan + Dism /Image:"$MountDirectory" /Get-Intl + + # Write-Warning "Waiting 10 seconds for processes to complete before applying DotNet ..." + # Start-Sleep -Seconds 10 + # Update-DotNetOS -Force + + # Write-Warning "Waiting 10 seconds for processes to complete before applying LCU ..." + # Start-Sleep -Seconds 10 + # Update-CumulativeOS -Force + + Write-Warning "Waiting 10 seconds for processes to complete before Save-WindowsImage ..." + Start-Sleep -Seconds 10 + Save-WindowsImage -Path "$MountDirectory" | Out-Null + + Write-Warning "Waiting 10 seconds for processes to complete before Export-WindowsImage ..." + Start-Sleep -Seconds 10 + Export-WindowsImage -SourceImagePath "$TempInstallWim" -SourceIndex 1 -DestinationImagePath "$DestinationFullName\OS\Sources\install.wim" -DestinationName "$($Media.ImageName) $LangMultiLanguage" | Out-Null + } } #================================================= # Index Rename @@ -200,12 +208,16 @@ function New-OSBuildMultiLang { # Extract "Display Description" $DisplayDescription = ($WimInfo | Select-String "Display Description:" | ForEach-Object { $_ -replace "Display Description:\s+", "" }).Trim() + + # Extract "Description" + $Description = ($WimInfo | Select-String "^\s*Description:" | ForEach-Object { $_ -replace ".*Description:\s+", "" }).Trim() $DisplayName = "$DisplayName $DefaultLang" $DisplayDescription = "$DisplayDescription $DefaultLang" + $Description = "$Description $DefaultLang" # Set new Display Name and Display Description - wimlib-imagex info "$DestinationFullName\OS\Sources\install.wim" $Index --image-property DISPLAYNAME="$DisplayName" --image-property DISPLAYDESCRIPTION="$DisplayDescription" + wimlib-imagex info "$DestinationFullName\OS\Sources\install.wim" $Index --image-property DISPLAYNAME="$DisplayName" --image-property DISPLAYDESCRIPTION="$DisplayDescription" --image-property DESCRIPTION="$Description" } #================================================= # Cleanup