Check Windows Version CMD

Introduction

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.

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.
Exaple:-

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.

 C:\Users\Kailash>systeminfo  

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 ----------------------------------------  
 systeminfo  
 pause  

Summary

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

Thanks

Kailash Chandra Behera

An IT Professional with 12 years experience in development life cycle in windows, service and Web based application using Microsoft.Net technologies. Proven record of developing all phases of projects in Microsoft.Net technology from initiation to closure aligning with the company's Business objectives to drive process improvements, competitive advantage and bottom-line gains. -> Good exposure of independently working and developing multiple projects ->Committed to efficient and effective development of projects in a fast-paced and deadline driver environment. Skill :- Develop and design projects in various technologies of Microsoft Technology. Total IT Experience- 13+

Previous Post Next Post

نموذج الاتصال