Microsoft 学坏了……现在记载 ESD 链接的 Cab 包也通过 Windows Update 更新服务器动态提供下载链接,以后找起来就麻烦了🙁
Github 上翻到一个有用的脚本。
function Get-Microsoft25H2CatalogUrl {
[CmdletBinding()]
param()
$uri = 'https://fe3.delivery.mp.microsoft.com/UpdateMetadataService/updates/search/v1/bydeviceinfo'
$ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) MediaCreationTool/10.0'
$targetVersions = @('26200.0.0.0', '26100.0.0.0')
$deviceAttributes = @(
'MediaBranch=br_release'
'App=Setup360'
'LCUVersion=10.0.28000.1340'
'OfflineAttributesOnly=0'
'MediaVersion=10.0.28000.1340'
'AppVer=10.0'
'PreviewBuilds=1'
'CompositionEditionId=Enterprise'
'CurrentBranch=br_release'
'OSArchitecture=AMD64'
'InstallationType=Client'
'FlightingBranchName=CanaryChannel'
'DUInternal=0'
'FlightRing=External'
'BuildFlighting=1'
'HotPatchEligible=0'
'OSSKUId=48'
'IsoCountryShortCode=US'
'OSVersion=10.0.26100.1'
'AttrDataVer=338'
'EditionId=Professional'
'DUScan=1'
) -join ';'
foreach ($targetVersion in $targetVersions) {
$body = @{ Products = "PN=Windows.Products.Cab.amd64&V=$targetVersion"; DeviceAttributes = $deviceAttributes } | ConvertTo-Json -Compress
Write-TSxLog -Message "Trying 25H2 catalog lookup for target version: $targetVersion" -WriteVerbose
try {
$response = Invoke-RestMethod -Uri $uri -Method Post -Body $body -Headers @{ 'Content-Type' = 'application/json'; Accept = '*/*'; 'User-Agent' = $ua } -TimeoutSec 60
if ($response -is [array] -and $response.Count -gt 0 -and $response[0].FileLocations) {
return $response[0].FileLocations[0].Url
}
if ($response.FileLocations) {
return $response.FileLocations[0].Url
}
if ($response.Updates -and $response.Updates.Count -gt 0 -and $response.Updates[0].FileLocations) {
return $response.Updates[0].FileLocations[0].Url
}
} catch {
Write-TSxLog -Level 'WARN' -Message "25H2 lookup attempt failed for ${targetVersion}: $($_.Exception.Message)" -WriteVerbose
continue
}
}
throw 'Unable to resolve a Microsoft 25H2 catalog URL.'
}
并获取了当前的 26300.9711 包,顺便放在这里供查阅吧。