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

0 – Unknown.1 – No Root directory.2 – Removable Disk.3 – Local Disk.4 – Network Drive.5 – Compact Disc.6 – RAM Disk.

1] Get General Information

Open Windows PowerShell and execute the following command to get general information about the connected hard drives: 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: The following are the parameters, and in case of multiple parameters, they should be separated by a comma:

AvailabilityBytesPerSectorCapabilitiesCapabilityDescriptionsCaptionCompressionMethodConfigManagerErrorCodeConfigManagerUserConfigCreationClassNameDefaultBlockSizeDescriptionDeviceIDErrorClearedErrorDescriptionErrorMethodologyFirmwareRevisionIndexInstallDateInterfaceTypeLastErrorCodeManufacturerMaxBlockSizeMaxMediaSizeMediaLoadedMediaTypeMinBlockSizeModelNameNeedsCleaningNumberOfMediaSupportedPartitionsPNPDeviceIDPowerManagementCapabilitiesPowerManagementSupportedSCSIBusSCSILogicalUnitSCSIPortSCSITargetIdSectorsPerTrackSerialNumberSignatureSizeStatusStatusInfoSystemCreationClassNameSystemNameTotalCylindersTotalHeadsTotalSectorsTotalTracksTracksPerCylinder

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.