Skip to content
Related Articles

Related Articles

Improve Article

CMD Commands to Gather Information of a System

  • Last Updated : 26 Nov, 2020

Some say that gathering information is only possible in Linux, but it can be done with windows using a command prompt. These are some useful commands used by hackers for gathering system information that every Geek should be aware of. To execute all these commands, run the Command Prompt as Administrator to get access to the system information.

This article is using wmic commands. Wmic is a tool of the command prompt to get system information. The full form of wmic is the Windows Management Interface command. The list of Commands for gathering information are mentioned below.

Serial Number

The command is used to get the computer’s serial number. This is very helpful to get the serial number of our bios. We will get our serial number instead of O.E.M.

wmic bios get serialnumber
Serial Number in cmd

wmic bios get serialnumber command

Mac Address



The command is used to get Mac Address is given below but there other be other ways also by which we can get our Mac Address. 

wmic nic get macaddress :: Method 1
getmac :: Method
mac address using cmd

getmac

CPU

This command helps to gather all information about a CPU i.e. name, device id, number of cores, max clock speed, status. This can also help us in figuring out our CPU specs. 

wmic cpu

We can also send attributes to get the particular details of a CPU in a better view. You may use a particular attribute to get particular details of CP.

wmic cpu get caption, name, deviceid, numberofcores, maxclockspeed, status
CPU

get cpu command

RAM

There are many times when we need to know the RAM size of a machine. The following command helps us to get the total size of the ram in the number of bits. We can convert the size from bits to bytes if we want to know by dividing the size by 8.

Given_Ram_Size (in bits) / 8 = New_Ram_Size (int bytes)

wmic computersystem get totalphysicalmemory
RAM in windows

totalphysicalmemory command

 

Partition Details



In many cases, we need to know the size of the disc as well as the partition of our/someone’s disk. Here is the command to get the details of the partition of the disc. Here also, like in CPU, we can get the particular detail of the disc, like getting the name or size or type or getting everything in one shot.

 The size given here is also in terms of bits. We can convert it into byte by dividing the given size by 8.

Given_Ram_Size (in bits) / 8 = New_Ram_Size (int bytes)

wmic partition get name,size,type
Partition Details

wmic partition get name,size,type

Process

These are the commands which can help us to get the list of all processes running on our computer, and we can also close them by using these commands. These commands are very useful to get to know what tasks are running on someone’s machine. It gives us a list of processes that are running in our background.

wmic process list
Process List

wmic process list command

We can terminate these tasks by using the command: 

wmic process where name="name_of_file" call terminate

Note: Put the name of the ‘.exe file’ in place of “name_of_file” 

Example:

Let’s say, we want to terminate the calculator. So, open a calculator in the system and terminate the process by using the following steps:

1. After opening the calculator, execute the following command.

wmic process list
wmic process list

calculator.exe

2. Now, execute the following command and it will terminate the ‘Calculator.exe’ process.



wmic process where name="Calculator.exe" call terminate
wmic process where name="Calculator.exe" call terminate

terminate calculator using cmd

Product

This command gives/returns us the list of all products/software installed on a computer that is developed by a well-known developer and is recognized by the windows[Microsoft]. 

wmic product
::OR
wmic product get name,version
wmic product

wmic product get name, version

Basic Volume Details

This command gives us the details of a particular volume of the disc. This also gives us the serial number of the volume of that disc.

vol volume_letter:

Note: Replace volume_letter with the letter of the volume you wish to use.

Basic Volume Details

Window’s Version

This command gives us the window’s version. This helps us figure out that if the updates are installed in our system or what is our window’s version. The command pop up a new window about windows where we can see our Windows version.

winver
winver

winver command

Check Disk

This command gives us a list of all large files and files which are harmful. This can also help us to figure out which file is taking more space and we can also delete those files to clean some memory in the disc.

chkdsk
chkdsk

chkdsk

System Information

This command gives us all the basic information about our computer such as:

  • Host Name
  • OS Name
  • OS Version
  • OS Manufacturer
  • OS Configuration
  • Os Build Type
  • Registered Owner
  • Product ID
  • Original Install Date
  • Bios Version
  • Processor
  • Input Locale
  • Time Zone
  • & many more
systeminfo

systeminfo

system info

systeminfo

system info

Disk Details

This command gives us whole details of our hard disk where we can select volume get whole details of that volume.

    diskpart
::'disk part' will get us to an infinite loop.
    list disk
::'list disk' will give us the status and the size of the hard disk partition
    select disk_name
::Enter our disk name instead of 'disk_name' and our disk will be selected
    detail disk
::This will give us option which we can use to manipute our disk
    exit
::This will finally help us to exit the infinite loop

diskpart

diskpart command

diskpart

list disk

diskpart

select disk_name

diskpart

disk detail

diskpart

exiting disk




My Personal Notes arrow_drop_up
Recommended Articles
Page :