Setting an Asset Tag on ThinkPads with a MDM
For anyone that would like to set an Asset Tag on their ThinkPad once the device is under management with either Intune or MobileIron, this post can provide a way of helping you achieve this.
For those that are unaware, there is a Windows Utility to Read and Write Asset ID Information provided by Lenovo, specifically for ThinkPad. With this utility, you are able to set asset ID data such as an Owner Name, Owner Location, Asset Number and several other pieces of information. Per the ReadMe, here's a list of what can be set with the tool:
USERDEVICE <Field1> - These fields are defined by the user.
: The maximum number of user fields is five.
IPADDRESS[n] (1<=n<=NUMNICS, default is 1)
Note: The USERASSETDATA.ASSET_NUMBER is available through WMI by querying the SMBIOSAssetTag field of the Win32_SystemEnclosure class.
What's highlighted above is what's in the sample PowerShell script below, which can be deployed using the Intune Management Extension or MobileIron Cloud with Bridge.
Save the sample script and go to your MobileIron Cloud console. Click on the Configurations tab and select to Add a new configuration
Type in Bridge in the configuration search field and select MobileIron Bridge
Define a name and either drag/drop the .ps1 file to the console or manually choose to search and upload it
Continue through the distribution and assignments wizard to complete the MI Bridge Configuration
Save the sample script and go to your Intune management portal. Click on the Device Configurations blade and select PowerShell Scripts
Assign to users or devices group(s)
Once deployed to the target clients, you can double check by running the command WinAIA.exe -get
The following window will pop up to show what's been set. The -output-file switch also dumps a txt file that shows this as well.
You can also query the smbiosassettag property of the win32_systemenclosure class to see the updated tag. (a reboot may be required).