Hello,
I came into some issues when defining multiple features (or capabilities) to be installed at the same time, as an example:
Set-IniFileValue -Path $configFilePath -Section "Default" -Key "extra_features" -Value "Microsoft-Hyper-V,Microsoft-Hyper-V-Management-Clients"
and/or:
Set-IniFileValue -Path $configFilePath -Section "Default" -Key "extra_capabilities" -Value "OpenSSH.Server,OpenSSH.Client"
It seems that the values are correctly split (by the split(",") by
if ($windowsImageConfig.extra_features) {
Enable-FeaturesInImage $winImagePath $windowsImageConfig.extra_features.split(",")
}
if ($windowsImageConfig.extra_packages) {
foreach ($package in $windowsImageConfig.extra_packages.split(",")) {
Add-PackageToImage $winImagePath $package -ignoreErrors $windowsImageConfig.extra_packages_ignore_errors
}
}
but then, "Enable-FeaturesInImage" (or Add-PackageToImage) passes a string "Microsoft-Hyper-V Microsoft-Hyper-V-Management-Clients" instead of "Microsoft-Hyper-V" and "Microsoft-Hyper-V-Management-Clients" to dism.exe.
Contrary to what's been reported in this PR, if the value is unquoted, Set-IniFileValue complains about not being able to convert the value into System.String.
Host OS: Windows Server 2025
Powershell version: 5.1.26100.7462
Regards,
B.
Hello,
I came into some issues when defining multiple features (or capabilities) to be installed at the same time, as an example:
and/or:
It seems that the values are correctly split (by the split(",") by
but then, "Enable-FeaturesInImage" (or Add-PackageToImage) passes a string "Microsoft-Hyper-V Microsoft-Hyper-V-Management-Clients" instead of "Microsoft-Hyper-V" and "Microsoft-Hyper-V-Management-Clients" to dism.exe.
Contrary to what's been reported in this PR, if the value is unquoted, Set-IniFileValue complains about not being able to convert the value into System.String.
Host OS: Windows Server 2025
Powershell version: 5.1.26100.7462
Regards,
B.