Powershell – Get Service Tags Remotely
Quick Powershell snippet to retrieve service tags from remote machines. Create a text file with one FQDN or IP per line. Adjust the Get-Content line in the snippet below and run.
$list = Get-Content -Path "c:\some\file.txt" ForEach ($machine in $list) { $colItems = Get-WmiObject Win32_BIOS -Namespace “root\CIMV2" -Computername $machine ForEach($item in $col) { Write-Host $machine "=" $item.SerialNumber } }