How to get Windows version from command prompt or from PowerShell

Sandie picture Sandie · Mar 14, 2017 · Viewed 77.2k times · Source

Windows version.

But is there a way to get the exact version string using command line output similar to the one mentioned in the image?

The attached is the output of "winver" command from run. PS: I am looking for a batch or PowerShell command.

There are some alternates available to get the Windows version like this PowerShell command:

[System.Environment]::OSVersion

Answer

shameer1101 picture shameer1101 · Mar 14, 2017

The following commands are is going to help you with that. If you need more information, just type in systeminfo:

systeminfo | findstr /B /C:"OS Name" /C:"OS Version"

wmic os get Caption,CSDVersion /value