how to get bios asset tag value?

I use get-wmiobject can not get asset tag value in bios.
Please tell me to write this command

Try this

Get-CimInstance -ClassName CIM_BIOSElement

in this “Get-CimInstance -ClassName CIM_BIOSElement” can not show asset tag,
this command is show win32_bios, but i can not find asset tag preperty.

Try

(Get-WmiObject Win32_SystemEnclosure).SMBiosAssetTag

hmmm … I guess it depends pretty much on the underlying hardware, isn’t it? On my Lenovo the command

(Get-WmiObject Win32_SystemEnclosure).SMBiosAssetTag
produces the result
No Asset Information

With the command
(Get-CimInstance -ClassName CIM_BIOSElement).serialnumber
I get my serial number without problems.

(Get-CimInstance -ClassName CIM_BIOSElement).serialnumber
and
(Get-WmiObject Win32_BIOS).SerialNumber
will produce the manufacturer's serial number. The asset tag is a configurable attribute that is blank by default. If it returns nothing then the asset tag has not been set in the bios. We assign the asset tag for internal tracking and accounting purposes.

Thanks

            _
           /(|
          (  :
         __\  \  _____
       (____)  `|
      (____)|   |
       (____).__|
        (___)__.|_____