In the New-CMRequirementRuleOperatingSystemValue description says that the -PlatformString used with CI_ID but you actually have to use ModelName on it.
We can get modelnames it like this:
Get-CMConfigurationPlatform -Name "Windows 1" | Select-Object LocalizedDisplayName,ModelName
Thanks @boozeman for the feedback! I thought I had tested that option, but I can reproduce your results now. I'm updating the article with a big refresh I'm working on. Thanks again
In the New-CMRequirementRuleOperatingSystemValue description says that the -PlatformString used with CI_ID but you actually have to use ModelName on it.
We can get modelnames it like this: Get-CMConfigurationPlatform -Name "Windows 1" | Select-Object LocalizedDisplayName,ModelName
And then use like this:
$myGC = Get-CMGlobalCondition -Name "Operating System" | Where-Object PlatformType -eq 1 $myRule = $myGC | New-CMRequirementRuleOperatingSystemValue -RuleOperator OneOf -PlatformString "Windows/All_x64_Windows_10_and_higher_Clients","Windows/All_x64_Windows_11_and_higher_Clients"
This was the only way to got it work properly. Is this error or am I missing something?
MECM tested with this is version 2107
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.