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
I apologize if this issue already exists and I missed it or if you are already aware of this issue. This is my first time submitting an issue here.
When using the System.Environment assembly to get the Windows OS version that is it running PowerShell reports the same version of Windows as Windows 8/Windows Server 2012 instead of the correct version of Windows on Windows 8.1/Windows Server 2012R2 and Windows 10/Windows Server 2016. I found a stackoverflow article referencing Windows Developer document. It is probably not this simple but you might need to modify your manifest file for your PowerShell builds.
Steps to reproduce
[System.Environment]::OSVersion.Version
Expected behavior
[System.Environment]::OSVersion.Version
Major Minor Build Revision
----- ----- ----- --------
10 0 16299 0
Actual behavior
[System.Environment]::OSVersion.Version
Major Minor Build Revision
----- ----- ----- --------
6 2 9200 0
Environment data
>$PSVersionTable
Name Value
---------
PSVersion 6.0.2
PSEdition Core
GitCommitId v6.0.2
OS Microsoft Windows 10.0.16299
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
The text was updated successfully, but these errors were encountered:
I don't think the results relates to the actual Windows OS Build. It's something else:
PS [81] > [System.Environment]::OSVersion.VersionString
Microsoft Windows NT 6.2.9200.0
PS [70] > cmd
C:\Program Files\PowerShell\6.0.2>ver
Microsoft Windows [Version 10.0.17127.1]
PS [84] > $PSVersionTable.os
Microsoft Windows 10.0.17127
I'm sure it's the internal Windows Build version.
:)
* For applications that have been manifested for Windows 8.1 or Windows 10. Applications not manifested for Windows 8.1 or Windows 10 will return the Windows 8 OS version value (6.2). To manifest your applications for Windows 8.1 or Windows 10, refer to Targeting your application for Windows.
Uh oh!
There was an error while loading. Please reload this page.
I apologize if this issue already exists and I missed it or if you are already aware of this issue. This is my first time submitting an issue here.
When using the System.Environment assembly to get the Windows OS version that is it running PowerShell reports the same version of Windows as Windows 8/Windows Server 2012 instead of the correct version of Windows on Windows 8.1/Windows Server 2012R2 and Windows 10/Windows Server 2016. I found a stackoverflow article referencing Windows Developer document. It is probably not this simple but you might need to modify your manifest file for your PowerShell builds.
Steps to reproduce
[System.Environment]::OSVersion.Version
Expected behavior
Actual behavior
Environment data
The text was updated successfully, but these errors were encountered: