Hard Disk

How to use Windows PowerShell to find information about Hard Drive

How to use Windows PowerShell to find information about Hard Drive

Windows PowerShell is a powerful utility that comes preinstalled on Windows 10. Microsoft has been pushing it hard to become useful for developers and IT professionals. Windows PowerShell can also be used to manage hard drive and SSDs. In this post, we will check how to use PowerShell to find information about any class of hard drive.

Use PowerShell to find information about hard drive

There are two things that you can do using PowerShell to get physical disk information, including serial number, disk size, free space, and more.

  1. Get General Information.
  2. Retrieve detailed information.

The command works with all the storage devices connected to your computer. You can identify the type of device by looking at the Device type column. The column displays an integer that corresponds to the type of disk drive the logical disk represents.

1] Get General Information

Open Windows PowerShell and execute the following command to get general information about the connected hard drives:

get-wmiobject -class win32_logicaldisk

The results will display DeviceID, DriveType, ProviderName, FreeSpace, Size, VolumeName.

2] Retrieve detailed information

Open Windows PowerShell once again, and type in the following code and hit Enter:

wmic diskdrive get 

The following are the parameters, and in case of multiple parameters, they should be separated by a comma:

The result will be sorted, a tabular form of the requested data inside the Windows PowerShell command line.

You can read more about the commands on docs.microsoft.com.

Best Linux Distros for Gaming in 2021
The Linux operating system has come a long way from its original, simple, server-based look. This OS has immensely improved in recent years and has no...
Kuinka siepata ja suoratoistaa pelisessiosi Linuxissa
Aikaisemmin pelaamista pidettiin vain harrastuksena, mutta ajan myötä pelialalla tapahtui valtava kasvu tekniikan ja pelaajien määrän suhteen. Peliala...
Parhaat pelit, joita voi seurata käsien seurannalla
Oculus Quest esitteli äskettäin loistavan ajatuksen seurannasta ilman ohjaimia. Yhä kasvavan määrän pelejä ja aktiviteetteja, jotka tukevat tukea joko...