You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Microsoft/OSInfo resource currently performs exact string matching on the version property. This means asserting version: "10.0.22621" fails on a machine running 10.0.26614 — even though the machine exceeds the minimum requirement.
For configuration authors using Microsoft/OSInfo in assertions (e.g., "this config requires Windows 11 22H2 or later"), there's no way to express a minimum version constraint.
Observed behavior
dsc resource test -r Microsoft/OSInfo --input '{"family": "Windows", "version": "10.0.22621"}'
On a machine running 10.0.26614:
inDesiredState: falsedifferingProperties:
- version
Expected behavior
A way to specify that version should be treated as a minimum (>=) rather than an exact match. For example:
Or alternatively, support a comparison operator on the version property:
properties:
version:
minimum: "10.0.22621"
Use case
WinGet Configuration files that need to assert a minimum OS version before applying resources (e.g., Dev Drive requires 22H2+, certain Windows Settings resources require specific builds). The Microsoft.Windows.Developer/OsVersion resource in WinGet DSC v2 supported MinVersion for this purpose — the native Microsoft/OSInfo resource would be the faster v3 equivalent if it supported minimum version comparison.
Additional context
Microsoft/OSInfo capabilities are get + export (read-only, no set) — ideal for assertions
It's a native Rust binary so it's extremely fast compared to PowerShell-based alternatives
Semantic version comparison (or at minimum numeric dotted-version comparison) would make this resource the canonical way to gate configs by OS version
Summary of the new feature / enhancement
The
Microsoft/OSInforesource currently performs exact string matching on theversionproperty. This means assertingversion: "10.0.22621"fails on a machine running10.0.26614— even though the machine exceeds the minimum requirement.For configuration authors using
Microsoft/OSInfoin assertions (e.g., "this config requires Windows 11 22H2 or later"), there's no way to express a minimum version constraint.Observed behavior
On a machine running
10.0.26614:Expected behavior
A way to specify that
versionshould be treated as a minimum (>=) rather than an exact match. For example:Or alternatively, support a comparison operator on the
versionproperty:Use case
WinGet Configuration files that need to assert a minimum OS version before applying resources (e.g., Dev Drive requires 22H2+, certain Windows Settings resources require specific builds). The
Microsoft.Windows.Developer/OsVersionresource in WinGet DSC v2 supportedMinVersionfor this purpose — the nativeMicrosoft/OSInforesource would be the faster v3 equivalent if it supported minimum version comparison.Additional context
Microsoft/OSInfocapabilities areget+export(read-only, noset) — ideal for assertions