Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Find serial numbers on slaved HDDs with Powershell

04 Feb 2016   #1
musik7

Windows 7 Enterprise 64 bit
 
 
Find serial numbers on slaved HDDs with Powershell

For starters, a little background. I am in the IT dept at my company, and we have a large number of HDD's that we need to archive. I have a powershell script that will grab hostname and username info from the drives, but I would like to grab the serial numbers as well if I can.

Here's what I currently have that will grab the serial number info:

$Disks = Get-WMIObject -class win32_PhysicalMedia
foreach($Disk in $Disks) {Write-Host $Disk.SerialNumber}

Ok, here's my question:
This portion of the script works just fine, but it seems that the serial number field that stores this information is blank unless the PC was booted up with the HDD connected internally. I have close to 200-300 HDD's that I need to go through and we usually get a couple more every day, so it's not very feasible to reboot the computer for each drive (as opposed to using a USB HDD dock). Does anyone know if it's possible to have the computer re-scan the disks, or some other action that will cause this serial number field to populate, or will it only be populated when the drive is installed internally from boot-up?

Thanks in advance for the help.


My System SpecsSystem Spec
.
04 Feb 2016   #2
Layback Bear

Windows 7 Pro. 64/SP-1
 
 

I'm not a cmd line person but you could try these two 3rd party program install on the mother computer. Then just plug in the usb drive and run the program.
On my systems their is no reboot needed. Just plug them in the usb and run one of the programs.

Speccy
Belarc

Belarc Advisor - Free Personal PC Audit, for software, hardware and security configuration information on your computer. Software license management, IT asset management, cyber security audits, and more.

https://www.piriform.com/speccy

From Belarc

Drives 239.82 Gigabytes Usable Hard Drive Capacity
182.38 Gigabytes Hard Drive Free Space

CD-ROM Drive [Optical drive]

INTEL SSDSC2BP240G4 [Hard drive] (240.06 GB) -- drive 0, s/n BTJR443200ZV240AGN, rev L2010420, SMART Status: Healthy
Memorex TD Classic 003C USB Device [Hard drive] (2.05 GB) -- drive 1

-----------------------------------------------------------------------------

From Speccy

torage
Hard drives
Disk drive
Heads 16
Cylinders 29,185
Tracks 7,442,175
Sectors 468,857,025
SATA type SATA-III 6.0Gb/s
Device type Fixed
ATA Standard ATA8-ACS
Serial Number BTJR443200ZV240AGN
Firmware Version Number L2010420
LBA Size 48-bit LBA
Power On Count 327 times
Power On Time 50.3 days
Speed Not used (SSD Drive)
Features S.M.A.R.T., NCQ, TRIM, SSD
Max. Transfer Mode SATA III 6.0Gb/s
Used Transfer Mode SATA III 6.0Gb/s
Interface SATA
Capacity 223 GB
Real size 240,057,409,536 bytes
RAID Type None
S.M.A.R.T
Status Good
Temperature 21 C
Temperature Range OK (less than 50 C)
S.M.A.R.T attributes
Partition 0
Partition ID Disk #0, Partition #0
Size 100 MB
Partition 1
Partition ID Disk #0, Partition #1
Disk Letter C:
File System NTFS
Volume Serial Number 8A7DC2D0
Size 223 GB
Used Space 53 GB (23%)
Free Space 169 GB (77%)
Flash drives
Memorex TD Classic 003C USB Device
Interface USB
Capacity 1.91 GB
Real size 2,055,208,960 bytes
RAID Type None
S.M.A.R.T
S.M.A.R.T not supported
Partition 0
Partition ID Disk #1, Partition #0
Disk Letter E:
File System FAT
Volume Serial Number 60F0A925
Size 1.91 GB
Used Space 12.7 MB (0%)
Free Space 1.9 GB (100%)
My System SpecsSystem Spec
04 Feb 2016   #3
musik7

Windows 7 Enterprise 64 bit
 
 

Thanks for the tip, I'll keep that in mind. Ultimately, I would like to see if I can make it work within powershell though, as my powershell script gathers all the info, and then automatically prints it, so ultimately all I will need to do for each drive is connect it, and push F5.
My System SpecsSystem Spec
.

04 Feb 2016   #4
Layback Bear

Windows 7 Pro. 64/SP-1
 
 

I don't know enough about Powershell to be giving any advice.
Just wait, someone will come along.
My System SpecsSystem Spec
05 Feb 2016   #5
ComputerGeek

Desk 1: Win 7 Pro x32; Desk 2: Windows 10 x64
 
 

I don't know powershell either but here's another tool that might help. (It can also be run from command line and output to tab delimited file so you can extract the data you seek)

Look at USBDeview freeware from Nirsoft to see serial numbers of USB connected disks. (Note the disks don't even need be still connected. Note the column header Connected tells you if the device is still connected or not)

Click on column header Device Type to sort and then the scroll down to look at the USB Mass Storage (This device type also includes CD/DVD drives so you may still need to further filter the results if you only want disk)

btw... What is the host name and user name of a hard drive???


Attached Thumbnails
Find serial numbers on slaved HDDs with Powershell-2016-02-05_211147.jpg  
My System SpecsSystem Spec
08 Feb 2016   #6
musik7

Windows 7 Enterprise 64 bit
 
 

Quote   Quote: Originally Posted by ComputerGeek View Post
I don't know powershell either but here's another tool that might help. (It can also be run from command line and output to tab delimited file so you can extract the data you seek)

Look at USBDeview freeware from Nirsoft to see serial numbers of USB connected disks. (Note the disks don't even need be still connected. Note the column header Connected tells you if the device is still connected or not)

Click on column header Device Type to sort and then the scroll down to look at the USB Mass Storage (This device type also includes CD/DVD drives so you may still need to further filter the results if you only want disk)

btw... What is the host name and user name of a hard drive???
Thanks ComputerGeek, good info. I might look into USBDeview for it's command line options if I can't get it to work within powershell.

I'm basically just gathering what the hostname was for any drives with a windows OS on them, as well as the users listed in C:\Users (or Docs and settings for XP drives). There will be some drives that don't have a windows OS on them, so those won't follow my normal process.
My System SpecsSystem Spec
Reply

 Find serial numbers on slaved HDDs with Powershell




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
How2 find hardware serial numbers
The web is full of sites on how to find the serial number of your computer but not all serial numbers of hardware belonging to it. I also found 'Hardware ID Extractor.exe' which is extremely limited and both Belarc Advisor and Speccy do not provide such info. I was wondering if there is such...
Hardware & Devices
Windows search can't find files named with just numbers.
Hello, 1st post, glad to be here. I am having a problem that I find odd and something I never noticed with Windows Search in the Win 7 environment. I have users who name files strictly with numbers. No letters, just straight numbers. They're part drawings made by drafting software (i.e....
Network & Sharing
Problem repair ,reinstall, make FreeAgent bootable , find HD serial
Hello All, I have many inquiries now here is my situation : I am not sure weather my machine is infected. It happens after I installed clock creensaver; after reboot to window 7, there is an information identified around that the previous hardware or software installation may cause...
Installation & Setup
Incorrect serial numbers
I have a very odd situation. I have two external Western Digital hard drives. They were both purchased in two different years. One in 2011 and one in 2010. Sadly the one brought in 2010 is having hardware issues. Thankfully it is under warranty. Sadly the serial number is incorrect on the hard...
Hardware & Devices


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 13:27.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App