You can determine the version of Microsoft Windows installed on a system
from a
PowerShell prompt using [System.Environment]::OSVersion.Version
or (Get-WmiObject -class Win32_OperatingSystem).Caption
.
PS C:\Users\Public> [System.Environment]::OSVersion.Version Major Minor Build Revision ----- ----- ----- -------- 10 0 15063 0 PS C:\Users\Public> (Get-WmiObject -class Win32_OperatingSystem).Caption Microsoft Windows 10 Pro PS C:\Users\Public> (Get-WmiObject -class Win32_OperatingSystem) SystemDirectory : C:\WINDOWS\system32 Organization : Microsoft BuildNumber : 15063 RegisteredUser : Jeanne SerialNumber : 00330-80000-00000-AA775 Version : 10.0.15063 PS C:\Users\Public>
[ More Info ]