Create assettag.md

This commit is contained in:
John Kaiser
2019-01-28 18:04:21 -08:00
committed by GitHub
parent a99d8d3a5f
commit 5103c23adf

View File

@ -0,0 +1,95 @@
The Surface Asset Tag tool is a command line interface (CLI) utility
that allows you to view, assign, and modify an assigned asset tag value
for all Surface devices including Surface Pro 3 and later.
## System requirements
- Surface Pro 3 or later
- UEFI firmware version 3.9.150.0 or later
## Using Surface Asset Tag
To run Surface Asset Tag:
1. Download **Surface Pro 3 AssetTag.zip** from the [Microsoft Download
Center](http://www.microsoft.com/en-us/download/details.aspx?id=44076),
extract the zip file, and save AsseTag.exe in desired folder (in
this example, C:\\assets).
2. Open a command console as an Administrator and run AssetTag.exe,
entering the full path to the tool.
3. Restart Surface.
To get the proposed asset tag:
```
- Run AssetTag -g
```
**Example:**
C:\\assets\> C:\\assets\\AssetTag.exe -g
```
```
To clear the proposed asset tag:
- Run AssetTag -s
For example - C:\\assets\> C:\\assets\\AssetTag.exe -s
To set the proposed asset tag:
- AssetTag -s testassettag12
For example - C:\\assets\\AssetTag.exe -s testassettag12
**Note:** The asset tag value must contain between 1 and 36 characters.
Valid characters include A-Z, a-z, 0-9, period (.) and hyphen (-).
## Managing asset tags
You can view the existing asset tag in the UEFI settings under Device
Information (**Control Panel \> Recovery \> Advanced Startup \> Restart
now**.)
The figure below shows the results of running the Asset Tag Tool on
Surface Go.
![Results of running Surface Asset Tag tool on Surface Go.
](media/image1.png)
> **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”)
For example:
C:\\Windows\\System32\> (Get-WmiObject -query “Select \* from
Win32\_SystemEnclosure”)
### Using PowerShell
You can use the script below 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)
}