When managing multiple disks on a Windows Server, it can be helpful to identify each disk by its unique serial number. This can be useful for tracking, inventory, and troubleshooting purposes. Follow the steps below to quickly retrieve disk serial numbers using the Command Prompt.
Step-by-Step Guide to Retrieving Disk Serial Numbers
-
-
Open Command Prompt
- Log into your Windows Server as an Administrator.
- Click on the Start menu, type cmd, then right-click on “Command Prompt” and select “Run as administrator”.
- Running as an administrator is important to ensure you have the necessary permissions to access disk information.
-
Run the Command to Retrieve Disk Details
- In the Command Prompt window, type the following command to gather information about each disk, including the model, serial number, index, and media type:
wmic diskdrive get model,serialNumber,index,mediaType > C:info.txt
- Press Enter to execute the command.
- This command uses Windows Management Instrumentation Command-line (WMIC) to pull disk information and export it to a text file.
- In the Command Prompt window, type the following command to gather information about each disk, including the model, serial number, index, and media type:
-
Locate the Output File
- The output of this command is saved to a text file named
info.txt
on the C drive. - Open File Explorer, navigate to
C:
, and locate theinfo.txt
file. - Open the file with a text editor (e.g., Notepad) to view the details of each disk, including:
- Model: The model of each disk.
- Serial Number: The unique identifier for each disk.
- Index: Disk index number (useful for identifying which disk in Disk Management corresponds to the physical disk).
- Media Type: Type of media, such as HDD or SSD.
- The output of this command is saved to a text file named
Example Output
After running the command, your
info.txt
file might look something like this:Model SerialNumber Index MediaType -------------------------- ------------------ ------ --------- Samsung SSD 860 EVO 1TB S3Z9NB0K123456 0 SSD Seagate BarraCuda 2TB Z4N9QG0P789012 1 HDD
Additional Tips
- Alternative Command without File Output: If you prefer to see the output directly in the Command Prompt instead of saving it to a file, remove the
> C:info.txt
part of the command:wmic diskdrive get model,serialNumber,index,mediaType
- Using PowerShell: For those who prefer PowerShell, you can get similar disk information with this command:
-
Get-WmiObject win32_diskdrive | Select-Object Model, SerialNumber, Index, MediaType
Summary
Retrieving disk serial numbers on Windows Server is a straightforward process using the Command Prompt and WMIC. This approach is efficient for server administrators needing quick access to disk details for asset management, troubleshooting, or inventory tasks.
-