Environment.OSVersion en PowerShell frente a PowerShell ISE

Environment.OSVersion en PowerShell frente a PowerShell ISE

¿Por qué veo 2 versiones diferentes de mi sistema operativo de PowerShell y PowerShell ISE?

El sistema operativo: Evaluación del centro de datos Microsoft Windows Server 2012 R2

PowerShell: versión 4.0

Potencia Shell

PS C:\> [System.Environment]::OSVersion.Version

Major  Minor  Build  Revision
-----  -----  -----  --------
6      3      9600   0

PowerShell ISE

PS C:\> [System.Environment]::OSVersion.Version

Major  Minor  Build  Revision
-----  -----  -----  --------
6      2      9200   0       

Respuesta1

EnWindows 8.1/Servidor 2012 el GetVersionExdevuelve los datos para Windows 8 (6.2 Build 9200) si la aplicación no contiene el ID del sistema operativo compatible para Windows 8.1.

Parece que la GUI no incluye esta entrada.

información relacionada