-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Area-Maintainers-Buildspecific to affecting the buildspecific to affecting the buildResolution-FixedThe issue is fixed.The issue is fixed.
Description
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.0Metadata
Metadata
Assignees
Labels
Area-Maintainers-Buildspecific to affecting the buildspecific to affecting the buildResolution-FixedThe issue is fixed.The issue is fixed.