Learn about Windows PowerShell
Summary: Use Windows PowerShell 3.0 to determine the specific edition of Windows 8 running on your computer.
Using Windows PowerShell 3.0 in Windows 8, how can you determine the edition of Windows that is installed?
Use the Get-WindowsEdition cmdlet with the Online switch:
Good stuff, if you want to throw this directly to string the complete command becomes:
When I do the command "Get-WindowsEdition -online" i receive an error stating "Get-WindowsEdition: an attempt was made to load a program with an incorrect format."
How to find windows version, build number and revision number?
Click Start, type regedit and press Enter to open the Windows registry
Navigate to the registry key – HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion
On the right panel, you will find the key "CurrentBuildNumber".The value of this key is your Windows Build Number. Then find a key called "CurrentVersion" and its value is your windows version i.e. the version of your windows vista, windows xp, etc. You will also find keys called "EditionID" and "ProductId" to know the windows edition and product id.
The key BuildLabEx contains build number and revision number.For example, in the value 6001.17387.x86fre.vistasp1_gdr.070927-1921, the first four digits stand for build number i.e. 6001 and the next five digits stand for windows revision number i.e. 17387. x86 tells you that you are running a 32-bit operating system.
If any further doubt do let me know.
works for Windows 10 also