PowerShell One-Liner: Getting This Computer's Asset Tag Number
Here's a gem from an internal email:
CMD> wmic SystemEnclosure get SMBIOSAssetTag
5551212
If the system has asset tag data added to the BIOS, this is a way to collect it.
Comments
Anonymous
March 26, 2012
Here's a function for it: function Get-AssetTagAndSerialNumber { param ( [string[]]$computerName = @('.') ); $computerName | % { if ($) { Get-WmiObject -ComputerName $ Win32_SystemEnclosure | Select-Object __Server, SerialNumber, SMBiosAssetTag } } }Anonymous
January 12, 2015
If you want it as a one liner. (Get-WmiObject Win32_SystemEnclosure).SMBiosAssetTag or (Get-WmiObject -ComputerName Desktop01 Win32_SystemEnclosure).SMBiosAssetTag