Skip to content
Open
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
13 changes: 13 additions & 0 deletions Public/Start-OSDCloud.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,19 @@ function Start-OSDCloud {
}
$OSName = $Global:StartOSDCloud.OSName
Write-Host -ForegroundColor DarkGray "[$(Get-Date -format G)] OSName is set to $($Global:StartOSDCloud.OSName)"
#=================================================
# Derive OSVersion and OSBuild from OSName so that downstream
# logic (notably OSDCloudUSB OS caching in OSDCloud.ps1) works
# identically to the Legacy parameter set. Without this, users
# starting with -OSName get $null for OSVersion/OSBuild, which
# silently disables the automatic OS cache to USB.
#=================================================
if ($Global:StartOSDCloud.OSName -match '^(Windows \d+)\s+(\S+)\s+x64$') {
$Global:StartOSDCloud.OSVersion = $Matches[1]
$Global:StartOSDCloud.OSBuild = $Matches[2]
Write-Host -ForegroundColor DarkGray "[$(Get-Date -format G)] OSVersion derived from OSName: $($Global:StartOSDCloud.OSVersion)"
Write-Host -ForegroundColor DarkGray "[$(Get-Date -format G)] OSBuild derived from OSName: $($Global:StartOSDCloud.OSBuild)"
}
}
elseif ($PSCmdlet.ParameterSetName -eq 'Legacy') {
#=================================================
Expand Down