How to dynamically query releaseLabel or cycle from windows or windows-server devices #8402
Replies: 3 comments
-
|
I am not really aware of these details but you raise an interesting point. |
Beta Was this translation helpful? Give feedback.
-
I don't think adding a whole new key pair to the schema is necessary if that is an accurate way of filtering we can just use regex to filter the current 'latest' values. The issue I see with this is multiple cycles would return the same value in this instance. For example if we took "10.0.19044" so we filter for a regex pattern like "^[\d\.]*\.19044$" this would return 4 results. "10-21h2-e-lts", "10-21h2-e", "10-21h2-iot-lts" and "10-21h2-w". If these had the same EoL date it wouldn't matter but they do not unfortunately. Not sure if it's possible but perhaps a key for version that matches the value in the releases table from he following document https://learn.microsoft.com/en-us/lifecycle/products/windows-10-enterprise-and-education would be useful?. That is how my current solution works (it's not great hence why I'd love to move away from it). Although that might cause the same issue as I mentioned above. There would be multiple values returned for 21H2 for example. Quite the pickle but it would be awesome if something could be worked out happy to discuss further. |
Beta Was this translation helpful? Give feedback.
-
|
One issue I'm just seeing now on here is that there are multiple entries where the build number is the same and this is causing issues for me when I'm querying this because it returns incorrect information. Need to know how to pull the cycle version from the OS. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I was wanting to utilize the API to automate some reporting.
The issue I am having is what query should I use on windows devices to be able to dynamically construct a filter for the API?
Does anyone have an example of a code snippet for windows that will extract a string that can be used to filter the API?
For example right now querying the "HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion" key gives OS info but none of the properties match any releaseLabel or cycle strings. I could for example concatenate the "CurrentMajorVersionNumber" and "DisplayVersion" to make "10 22H2" for this one device but that isn't consistent various multiple builds (especially for windows-server).
Hope that makes sense. Any suggestions on automating this would be much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions