Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PSGetModuleInfo.xml
README.md
README.md
55 changes: 48 additions & 7 deletions Public/New-OSBuildMultiLang.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'}
Expand All @@ -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
Expand All @@ -149,25 +157,29 @@ function New-OSBuildMultiLang {
# Process Indexes
#=================================================
foreach ($LangMultiLanguage in $LangMultiLanguages) {
if ($LangMultiLanguage -eq $LangMultiDefaultName) {
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 -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 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
Expand All @@ -179,6 +191,35 @@ function New-OSBuildMultiLang {
}
}
#=================================================
# 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()

# 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" --image-property DESCRIPTION="$Description"
}
#=================================================
# Cleanup
#=================================================
try {
Expand Down
5 changes: 4 additions & 1 deletion Public/New-OSDBuilderISO.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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.*") {
Expand Down
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -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