title | description | ms.service | ms.localizationpriority | author | ms.author | ms.topic | ms.reviewer | ms.date | manager | appliesto | ||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Surface Asset Tag Tool |
Learn how to use the Surface Asset Tag Tool, a command-line utility for viewing, assigning, and modifying asset tags on Surface devices. This guide covers system requirements, usage instructions, and command examples for effective asset management |
surface |
medium |
coveminer |
chauncel |
how-to |
carlol |
05/21/2024 |
frankbu |
|
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.
- Surface Pro 3 or later and all newer Surface devices
- Unified Extensible Firmware Interface (UEFI) firmware version 3.9.150.0 or later.
To run Surface Asset Tag:
-
Download the Surface IT Toolkit and install it on the PC you use to manage devices in your organization.
-
Open Surface IT Toolkit. Select Tool Library > Surface Asset Tag > Save a copy and choose ARM64 or X64.
:::image type="content" source="images/surface-asset-tag-download.png" alt-text="Screenshot of Surface Asset Tag download.":::
-
Open a command console as an Administrator and run AssetTag.exe, entering the full path to the tool.
-
Restart Surface.
[!NOTE] After setting the asset tag, a second reboot is required before it appears in WMI.
In the following examples, AssetTag.exe is saved in a directory on a local machine (C:\assets).
To get the proposed asset tag, run AssetTag -g:
C:\assets\AssetTag.exe -g
To clear the proposed asset tag, run AssetTag -s:
C:\assets\AssetTag.exe -s
To set the proposed asset tag, run AssetTag -s testassettag12:
C:\assets\AssetTag.exe -s testassettag12
Tip
The asset tag value must contain between 1 and 36 characters. Valid characters include A-Z, a-z, 0-9, period (.) and hyphen (-).
You can view the existing asset tag in the UEFI settings under Device Information (Control Panel > Recovery > Advanced Startup > Restart now.)
The following figure shows the results of running the Asset Tag Tool on Surface Go.
Figure 1. Results of running Surface Asset Tag tool on Surface Go
Alternately, you can use WMI to query the existing asset tag on a device:
(Get-WmiObject -query "Select * from Win32_SystemEnclosure")
C:\Windows\System32> (Get-WmiObject -query "Select * from Win32_SystemEnclosure")
You can use the following script as a way of getting the proposed value and interpreting 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)
}
- v193.139, released October 4, 2023. Included in Surface IT Toolkit Library, April 25, 2024.