_Alfred

"In this the love of God was made manifest among us, that God sent his only Son into the world, so that we might live through him." - 1 John 4:9,10.

Get Serial Numbers of Network Computers by using a Powershell Script

By Alfred - Published: 2011-03-31

Given a COMPUTERS.TXT file with the computers names one in each line and having a firewall exception for WMIC via group policy, you could use this PowerShell Script to get all your (turned on) computer names and their respective serial numbers.

function Get-Inventory {
      PROCESS {
        $computer = $_
            $bios = get-wmiobject win32_bios -computerName $computer
            $serial = $bios.serialnumber

            $obj = New-Object psobject
            $obj | Add-Member NoteProperty ComputerName $computer
            $obj | Add-Member NoteProperty BIOSSerial $serial
        Write-Output $obj
      }
}

get-content c:\COMPUTERS.TXT | Get-Inventory