Check Windows Version CMD

Kailash Chandra Behera | Wednesday, December 16, 2020


In this article, we are going to discuss how to check information about computer system, hardware information, its operating system and security info using command prompt(CMD) and batch file.


system info
Computer info(System info for Windows)

Getting Started

The systeminfo command is used to check or display computer configuration details on the CMD screen.

Before starting the discussion on how to use the system info in CMD or batch script (the batch script is the language supported by batch file), let’s discuss the systeminfo.


This is the Windows Server command used to displays detailed configuration about a computer like information about operating system, including operating system configuration, security, product ID, and hardware information (such as RAM, disk space, and network cards).

Parameter accepted by system info
  1. /s computer:- Specifies the name or IP address of a remote computer (do not use backslashes). The default is the local computer.
  2. /u domain\username:- Runs the command with the account permissions of the specified user account. If /u is not specified, this command uses the permissions of the user who is currently logged on to the computer that is issuing the command.
  3. /p password:- Specifies the password of the user account that is specified in the /u parameter.
  4. /fo format:- Specifies the output format with one of the following values:
    1. TABLE - Displays output in a table.
    2. LIST - Displays output in a list.
    3. CSV - Displays output in comma-separated values (.csv) format.
  5. /nh:- Suppresses column headers in the output. Valid when the /fo parameter is set to TABLE or CSV.
  6. /?:- Displays help at the command prompt.

To display the local computer’s configuration details as mentioned in the above definition section, you can use the systeminfo command as below in the CMD app and press the enter key.


You will get the result as shown in the image above. Using this command line we can check about the remote computer as well, see the below example.

 C:\Users\Kailash>systeminfo /s remote_computername /u maindom\username /p password /fo list  
Use System Info in Batch file

The following code example shows how to use the systeminfo in a batch file. Copy the below code and past it in notepad. Save the file as .cmd in your local drive. after saving it, double click on the cmd file. The command prompt window will appear with information about operating system hardware information, windows version etc.

 @echo off  
 color 0f  
 echo Checking System Information using Batch  
 echo ----------------------------------------  


In the above, we learned how to get information about operating systems and security and hardware information, OS version, etc.