Get windows version from command prompt

Windows has multiple command line utilities that can help find the version of the Windows OS running on your computer. Below is the list of commands and the information they provide.

  1. Systeminfo command – Windows OS name, version, edition and build number
  2. WMIC command – OS name and version
  3. Ver command – OS version

Find OS Version from command line(CMD)

Systeminfo is a useful command that can dump information about hardware and software running on your computer. Since we are interested in only the OS details, we can filter out other information with the use of findstr command.

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

Examples:

C:\>systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
OS Name: Microsoft Windows 10 Enterprise
OS Version: 10.0.19042 N/A Build 19042

This command works on Windows 19, Windows and on Server editions also. Find example for Windows 7 below.

systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
OS Name:                   Microsoft Windows 10 Enterprise
OS Version:                10.0.19042 N/A Build 19042

In case of Windows 7 SP1, the output would be slightly different as below.

c:\>systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
OS Name:                   Microsoft Windows 7 Enterprise
OS Version:                6.1.7601 Service Pack 1 Build 7601

If you want to print more details, you may use just ‘OS’ in the findstr search pattern. See example below for Server 2008.

C:\>systeminfo | findstr /C:"OS"
OS Name:                   Microsoft Windows Server 2008 R2 Enterprise
OS Version:                6.1.7600 N/A Build 7600
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Server
OS Build Type:             Multiprocessor Free
BIOS Version:             IBM -[BWE117AUS-1.05]-, 7/28/2005

Check Windows version using WMIC command

Run the below WMIC command to get OS version and the service pack number(Windows 7 and prior versions).

wmic os get Caption,CSDVersion /value

Example on Windows 10:

c:\>wmic os get Caption,CSDVersion /value
Caption=Microsoft Windows 10 Enterprise
CSDVersion=

Example on Windows 7:

c:\>wmic os get Caption,CSDVersion /value
Caption=Microsoft Windows 7 Enterprise
CSDVersion=Service Pack 1

If you want to find just the OS version, you can use ver command. Open command window and execute ver command. But note that this does not show service pack version.

C:\>ver
Microsoft Windows [Version 10.0.19042.2251]
C:\>

This command does not show version on Windows 7/Windows 10.

Also Read:

Complete list of Windows CMD commands

Самый простой способ быстро узнать версию и билд операционной системы Windows, установленной на компьютере – нажать сочетание клавиш
Win+R
и выполнить команду
winver
.

На скриншоте видно, что на компьютере установлена Windows 10 версия 22H2 (билд 19045.3324). Как номер релиза, так и номер сборки (билда) Windows позволяет однозначно идентифицироваться версию операционной системы на компьютере.

winver - окно с версией и биодом Windows

Также можно открыть окно с информацией о системе с помощью сочетания клавиш
Win+Pause
. Это откроет соответствующий раздел Settings (System -> About) или окно свойств системы (в зависимости от версии Windows).

Информация о версии Windows в панели Settings - data-lazy-src=

Начиная с Windows 10 20H2, классическое окно свойств системы в Control Panel скрыто и не доступно для прямого запуска. Чтобы вызвать его, выполните команду
shell:::{bb06c0e4-d293-4f75-8a90-cb05b6477eee}
.

Можно получить информацию о билде и версии Windows, установленной на компьютере, из командной строки.

Выполните команду:

systeminfo

Можно отфильтровать вывод утилиты:

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

Или воспользуйтесь WMI командой:

wmic os get Caption, Version, BuildNumber, OSArchitecture

команда systeminfo - вывести версию windows

Аналогом команды systeminfo в PowerShell является командлет Get-ComputerInfo:

Get-ComputerInfo | select OsName, OsVersion, WindowsVersion, OsBuildNumber, OsArchitecture

Get-ComputerInfo

Главный недостаток командлета Get-ComputerInfo – он выполняется довольно долго. Если вам нужно быстро узнать версию и билд Windows из скрипта PowerShell, лучше воспользоваться одной из следующий конструкций.

Версия Windows в переменной окружения:

[System.Environment]::OSVersion.Version

Из WMI класса:

Get-WmiObject -Class Win32_OperatingSystem | fl -Property Caption, Version, BuildNumber

В современных версиях PowerShell Core 7.x вместо командлета Get-WmiObject нужно использовать Get-CimInstance:

Get-CimInstance Win32_OperatingSystem | fl -Property Caption, Version, BuildNumber, OSArchitecture

Get-CimInstance Win32_OperatingSystem - узнать номер билда windows

Значение параметра OSArchitecture позволяет определить установлена ли на компьютере
x86
или
x64
версия Windows.

Можно получить номер билда и версии непосредственно из реестра Windows.

Reg Query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName
Reg Query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v DisplayVersion
Reg Query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v CurrentBuild

или

Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion"| select ProductName, DisplayVersion, CurrentBuild

версия и билд Windows в реестре

С помощью параметров реестра
ProductVersion
,
TargetReleaseVersion
и
TargetReleaseVersionInfo
в ветке HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate вы можете указать версию Windows, до которой ваш компьютер может автоматически обновиться. Эти параметры позволяют также запретить автоматическое обновление ОС до Windows 11.

Вы можете получить информацию о версии Windows на удаленном компьютере через PowerShell Remoting:

Invoke-Command -ScriptBlock {Get-ItemProperty 'HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion' | Select-Object ProductName, ReleaseID, CurrentBuild} -ComputerName wksPC01

Или WMI/CIM:

Get-ciminstance Win32_OperatingSystem -ComputerName wksPC01 | Select PSComputerName, Caption, OSArchitecture, Version, BuildNumber | FL

Если компьютер добавлен в домен Active Directory, вы можете получить информацию о версии/билде Windows на компьютере из атрибутов компьютера в AD (как получить список версий и билдов Windows в домене Active Directory).

To check the Windows version from CMD, you can use either the winver or the systeminfo command. Both commands work with PowerShell as well.

WINVER Command

Open a command prompt and type winver. It will open a popup window showing the information about your operating system.

winver

The following screenshot shows the output of the winver command in Windows 10:

check windows version using winver command

The head section shows the operating system you are running on your PC. The bottom part shows the build version and the edition (e.g., Pro, Home, Education, Enterprise).

You will see something similar to the following when you run the winver command on Windows 11:

how to check windows version cmd

SYSTEMINFO Command

The systeminfo command displays the operating system configuration information of your computer. You will find the Windows version under the OS Name directive (usually the second line).

systeminfo command

The systeminfo CMD command also shows other operating system information such as time zone, boot time network card(s) model, RAM size, etc.

The PowerShell equivalent to the systeminfo is Get-ComputerInfo (this will not work on CMD).

check windows version from powershell

To check the Windows version without all other details, add WindowsProductName Parameter to the command, as shown in the above screenshot.

Do you wonder how to find out what version of Windows is running?

The Windows version can be checked in multiple ways.

In this short note i am showing the easiest way to get information about the Windows version using the winver command from the “Run” dialog or using the systeminfo command from a command-line prompt (CMD) or from a PowerShell.

Cool Tip: How to find Windows product key from CMD & PowerShell! Read more →

To check your Windows version – press the ⊞ Win + R shortcut to open the “Run” dialog, type in winver and click “OK”.

The winver command launches the “About Windows” that displays the version of Windows that is running, the build number and what service packs are installed.

To find out your Windows version from a command-line prompt (CMD) or from a PowerShell, use the systeminfo command:

C:\> systeminfo
...
OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.19042 N/A Build 19042
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
...

Was it useful? Share this post with the world!

You can learn in this guide if you are unaware of how to check the Windows version on your desktop or laptop computer. As Microsoft pushes many major updates regularly, knowing the build number of your Windows 10/11 OS is very important. That will help you maintain the latest version of Windows on your computer and check the software and hardware compatibility.

Some features and tools only work on a certain version of Windows and build numbers (or later).

The edition indicates what type of Windows 10/11 you have. You can have Windows Home, Professional, and Enterprise. It depends on the purpose and environment you are using the OS. But the Build number indicates whether your system is using the latest final release of Windows OS relevant to you.

As no Service Pack (SP) concept exists in Windows 10 or 11, build number plays a major role here. You can find the Windows version and build number by command prompt and PowerShell, as described below, on the local or remote computer.

1) From Settings App

‘About your PC’ can show the build. Search for ‘About your PC’ and open it.

About Your PC

You can see below system is running on Windows 10 17763 build number.

OS Build In Settings App

Here is another Windows 11 that shows the version and build number by the About settings app.

Windows 11 Build Number

2) From System Information

Another place you can view the build number is System Information. This method will work on any Windows Operating system, like 11, 10, 8.1, Windows 7, and Vista. Search for “System information”.

Sys Infor Build

In System Summary, you can view the version and build of your Windows 10 Operating System.

Windows 11/10 Build number from Command Prompt

Here are a few ways to see the version and the build of Windows 10/11 from the command prompt.

3) Open the command prompt (Type ‘cmd’ in search), then type ‘ver’; it will show the Windows version, which has the build number also.

4) Another method is to get it via system information from the command prompt. Let’s filter the required field only.

Type the below command.

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

Correct Windows Version

5) The below command will open the dialogue GUI box but in a very useful and attractive way from the command prompt or PowerShell.

Even you can enter ‘winver‘ in the search (or run in older OSs), which can be opened by pressing the Windows key + R.

Winver Output

How to Check Windows version and Build by PowerShell Command:

6) According to delftstack, there are several PowerShell commands to get the details of the Windows OS on a computer.

One of the below commands can get the version and build number of the Windows OS.

Get-ComputerInfo | select WindowsProductName, WindowsVersion, OsHardwareAbstractionLayer

OS Build Details In PowerShell

We mentioned six steps to check your computer’s Windows version/build number. These commands also work on the Server versions such as Windows 2012 R2, Windows 2016 and 2019/2022. Checking the build number and comparing it with the latest release from Microsoft will ensure that your system is up-to-date with all features and security patches from Microsoft that are highly recommended.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Top cleaner for windows
  • Asus драйвер atk0100 для asus windows 7
  • Error windows xp text
  • Как запустить iperf на windows 10
  • Autologon windows 10 реестр