Microsoft-windows-languagefeatures-basic-zh-cn-package 31bf3856ad364e35 Amd64 .cab Access
if ($ImagePath) Write-Host "Targeting offline image at: $ImagePath" $dismArgs += @('/Image', $ImagePath) else Write-Host "Targeting online operating system" $dismArgs += @('/Online') $checkArgs = $dismArgs + @('/Get-Packages') $packages = & dism $checkArgs | Select-String -Pattern "Package Identity.*LanguageFeatures-Basic-zh-cn"
$dismArgs = @('/English', '/Quiet', '/LogLevel', '1') the feature enables adding:
Write-Host "Successfully added zh-cn basic language features." You can also generate a validation script to ensure the package matches the required architecture ( amd64 ) and CBS identifier ( 31bf3856ad364e35 ): the feature enables adding:
if ($LASTEXITCODE -ne 0) Write-Error "DISM failed. Check DISM log." exit $LASTEXITCODE the feature enables adding:
[string]$ImagePath # If omitted, applies to online OS )
function Test-LanguageFeatureCab param([string]$CabPath) $cabInfo = & dism /Get-PackageInfo /PackagePath:$CabPath /English $matchesArch = $cabInfo -match "amd64" $matchesPublisher = $cabInfo -match "31bf3856ad364e35" $isZhCn = $cabInfo -match "zh-cn" return ($matchesArch -and $matchesPublisher -and $isZhCn) If you’re building an answer file (autounattend.xml), the feature enables adding: