PowerShell One-Liner: Getting This Computer’s Asset Tag Number

Here's a gem from an internal email: 

CMD> wmic SystemEnclosure get SMBIOSAssetTag


If the system has asset tag data added to the BIOS, this is a way to collect it.

Comments (2)

  1. timdunn says:

    Here's a function for it:

    function Get-AssetTagAndSerialNumber {

       param  ( [string[]]$computerName = @('.') );

       $computerName | % {

           if ($_) {

               Get-WmiObject -ComputerName $_ Win32_SystemEnclosure | Select-Object __Server, SerialNumber, SMBiosAssetTag




  2. Bordwalk2000 says:

    If you want it as a one liner.

    (Get-WmiObject  Win32_SystemEnclosure).SMBiosAssetTag


    (Get-WmiObject -ComputerName Desktop01 Win32_SystemEnclosure).SMBiosAssetTag

Skip to main content