Get HDD serial numbers on remote computers

Use this simple script against a csv file to pull serial numbers on remote computers. The script assumes the user have the appropriate level of access on the remote computers in order to query WMI remotely.

Copy and paste this into a file and name it: Get-HDSerial.ps1

$Computerobjects = Import-CSV c:\temp\importdatalist.csv
ForEach ($computerobject in $computerobjects)
{
write-host $Computerobject
Get-WmiObject win32_diskdrive -ComputerName $computerobject | select model, serialnumber
}

Create a new csv file and name it “importdatalist.csv” and place it in your c:\temp directory

put a list of names on computers you need to query against in the list. One line for each computer.

example:

computer1

computer2

computer3

computer4

Now, open powershell and run that Get-HDSerial.ps1

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.