Even if you run Get-ComputerInfo in Powershell on Windows 11 it will return Windows 10 as the WindowsProductName, since 11 is not that different than 10 internally.
I would think you would have to maintain a list of build numbers (like for example at https://www.gaijin.at/en/infos/windows-version-numbers) and then look at the CurrentBuild value in the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion So anything > 22000 is Windows 11, for example. -- Alan Bourke alanpbourke (at) fastmail (dot) fm _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/ca13ea5f-5406-4fd3-b7f7-bef6e1a07...@app.fastmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.