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
491 changes: 392 additions & 99 deletions Private/AllFunctions.ps1

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Public/Get-OSBuilds.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function Get-OSBuilds {
[string]$OSMajorVersion,

#Filter the OSBuild by OS Release Id
[ValidateSet ('24H2','23H2','22H2','21H2','21H1','20H2',2004,1909,1903,1809)]
[ValidateSet ('26H2','25H2','24H2','23H2','22H2','21H2','21H1','20H2',2004,1909,1903,1809)]
[string]$OSReleaseId,

#Filter the OSBuild by Image Revision
Expand Down
6 changes: 5 additions & 1 deletion Public/Import-OSMedia.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ function Import-OSMedia {
Show-ActionTime; Write-Host 'Get-OSDBuilder: Validating OSDBuilder Content'
Show-ActionTime; Write-Warning 'This version of OSDBuilder supports:'
Show-ActionTime; Write-Warning 'Windows 10 1607 - 21H2 x64'
Show-ActionTime; Write-Warning 'Windows 11 21H2 - 24H2 x64'
Show-ActionTime; Write-Warning 'Windows 11 21H2 - 26H2 x64'
#Show-ActionTime; Write-Warning 'Windows Server 2016 1607 - Windows Server 2022 21H1'
Get-OSDBuilder -CreatePaths -HideDetails
#=================================================
Expand Down Expand Up @@ -529,6 +529,10 @@ function Import-OSMedia {
$GetWindowsImage | ConvertTo-Json | Out-File "$OSMediaPathInfo\json\$((Get-Date).ToString('yyyy-MM-dd-HHmmss'))-Get-WindowsImage.json"
(Get-Content "$OSMediaPath\WindowsImage.txt") | Where-Object {$_.Trim(" `t")} | Set-Content "$OSMediaPath\WindowsImage.txt"
#=================================================
Write-Verbose 'Remove Temporary Folder'
#=================================================
if (Test-Path "$MountDirectory") {Remove-Item -Path "$MountDirectory" -Force -Recurse | Out-Null}
#=================================================
# OSD-Export
#=================================================
Save-OSMediaWindowsImageContent
Expand Down
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
4 changes: 2 additions & 2 deletions Public/Save-OSDBuilderDownload.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function Save-OSDBuilderDownload {

#Feature Update Build
[Parameter(ParameterSetName = 'FeatureUpdates')]
[ValidateSet ('24H2','23H2','22H2','21H2','21H1','20H2',2004,1909,1903,1809)]
[ValidateSet ('26H2','25H2','24H2','23H2','22H2','21H2','21H1','20H2',2004,1909,1903,1809)]
[string]$FeatureBuild,

#Feature Update Edition
Expand Down Expand Up @@ -82,7 +82,7 @@ function Save-OSDBuilderDownload {

#Filter Microsoft Updates for a specific ReleaseId
[Parameter(ParameterSetName='OSDUpdate')]
[ValidateSet ('24H2','23H2','22H2','21H2','21H1','20H2',2004,1909,1903,1809,1803,1709,1703,1607,1511,1507,7601,7603)]
[ValidateSet ('26H2','25H2','24H2','23H2','22H2','21H2','21H1','20H2',2004,1909,1903,1809,1803,1709,1703,1607,1511,1507,7601,7603)]
[Alias('ReleaseId')]
[string]$UpdateBuild,

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