Understand Microsoft Surface Asset Tool
Surface Asset Tag is a command line interface (CLI) utility that allows you to view, assign, and modify an assigned asset tag value for Surface devices. The Surface Asset Tag runs on the following systems:
Surface Pro 3 or later and all newer Surface devices
UEFI firmware version 3.9.150.0 or later
Configure Surface Asset Tag
Surface Asset Tag is a command line interface (CLI) utility that allows you to view, assign, and modify an assigned asset tag value for Surface devices.
To run Surface Asset Tag:
On the Surface device, download Surface Asset Tag.zip from the Microsoft Download Center, extract the zip file, and save AssetTag.exe in desired folder (in this example, C:\assets).
Open a command console as an Administrator and run AssetTag.exe, entering the full path to the tool.
Restart Surface.
The following is example of command to run to get the proposed asset tag:
C:\assets\AssetTag.exe -g
The following is an example of a command to clear the proposed asset tag:
C:\assets\AssetTag.exe -s
The following is an example to set the proposed asset tag:
C:\assets\AssetTag.exe -s testassettag12
Manage asset tags
You can view the existing asset tag in the UEFI settings under Device Information (Control Panel > Recovery > Advanced Startup > Restart now.)
You can also use WMI to query the existing asset tag on a device:
(Get-WmiObject -query "Select * from Win32_SystemEnclosure").
PowerShell can be used to get the proposed values and interpret any errors:
AssetTag -g \> $asset\_tag 2\> $error\_message
$asset\_tag\_return\_code = $LASTEXITCODE
$asset\_tag = $asset\_tag.Trim("\`r\`n")
if ($asset\_tag\_return\_code -eq 0) {
Write-Output ("Good Tag = " + $asset\_tag)
} else {
Write-Output (
"Failure: Code = " + $asset\_tag\_return\_code +
"Tag = " + $asset\_tag +
"Message = " + $error\_message)
}