New
#1
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.