Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

Use Win32_SystemEnclosure.SMBIOSAssetTag to read the asset tag reported by a Windows server’s SMBIOS chassis data:

(Get-CimInstance -ClassName Win32_SystemEnclosure).SMBIOSAssetTag

This returns the tag value only. For a remote server, add -ComputerName. The result depends on what the server firmware or virtual hardware reports; a blank value does not necessarily mean the query failed.

Query the asset tag on the local server

The current PowerShell approach is Get-CimInstance. The Win32_SystemEnclosure class represents the system enclosure, and its SMBIOSAssetTag property maps to the asset-tag field in SMBIOS chassis data. Microsoft’s class reference documents that property and its source.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To display just the value:

Get-CimInstance -ClassName Win32_SystemEnclosure |
    Select-Object -ExpandProperty SMBIOSAssetTag

The shorter property-access form in the opening works too. The expanded-property form makes it clear that the output is the value rather than the full CIM object.

#1 Best Overall
McAuley Labels Custom Silver Asset Tags for Equipment, Barcode, 2x1 in
  • Instantly Improve Asset Tracking: Take control of inventory management with durable and customizable asset tags that resist water, scratches, and fading. Whether labeling tools, IT equipment, or machinery, your barcode labels ensure seamless tracking and security
  • Multiple Variations & Sizes for Your Needs: Choose from Metalized Silver, Heavy-Duty 3M Adhesive, or Semi-Gloss White Polyester asset tags. Available in standard 2x1” and 1.5x0.75” sizes, with custom color and sizing options to fit your inventory tracking requirements
  • Precision Printing & High-Contrast Visibility: Your barcode labels and serial number stickers feature sharp, high-contrast printing, making them easy to scan in any lighting condition. Perfect for fast inventory management, security tracking, and equipment identification
  • Strong Adhesion for Reliable Labeling: Featuring industrial-strength adhesive, your permanent labels bond securely to metal, plastic, and textured surfaces. Whether for laptops, servers, or machinery, they stay put with no peeling or fading
  • Built to Last, Unlike the Rest: McAuley asset tags are built to last - unlike flimsy stickers that fade, smudge, or peel. With high-contrast, easy-to-scan barcodes, they ensure precise asset tracking and long-term durability in any environment

For inventory, include identifying context. A tag on its own can be hard to match to a machine:

$enclosure = Get-CimInstance -ClassName Win32_SystemEnclosure

[pscustomobject]@{
    ComputerName = $env:COMPUTERNAME
    Manufacturer = $enclosure.Manufacturer
    Model        = $enclosure.Model
    SerialNumber = $enclosure.SerialNumber
    AssetTag     = $enclosure.SMBIOSAssetTag
}

Most systems report one enclosure instance, but scripts should not assume that in every environment. If more than one is returned, process each object:

Get-CimInstance -ClassName Win32_SystemEnclosure |
    ForEach-Object {
        [pscustomobject]@{
            AssetTag     = $_.SMBIOSAssetTag
            SerialNumber = $_.SerialNumber
            Manufacturer = $_.Manufacturer
            Model        = $_.Model
        }
    }

Query a remote server

For one remote Windows server, specify its name with -ComputerName:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Get-CimInstance -ClassName Win32_SystemEnclosure `
    -ComputerName SERVER01 |
    Select-Object PSComputerName, Manufacturer, Model, SerialNumber, SMBIOSAssetTag

-ComputerName accepts a NetBIOS name, fully qualified domain name, or IP address. This form uses WS-Man for the remote CIM connection; it does not require you to open an interactive PowerShell session on the server. The account still needs permission to query the target, and network, firewall, name-resolution, and WS-Man configuration must allow the connection. See Microsoft’s Get-CimInstance reference and remote WMI/CIM guidance.

If you need to supply credentials explicitly:

$credential = Get-Credential

Get-CimInstance -ClassName Win32_SystemEnclosure `
    -ComputerName SERVER01 `
    -Credential $credential

Test WS-Man connectivity with Test-WSMan SERVER01, then test the actual class with Get-CimInstance. A successful WS-Man test does not prove that the account has permission to read this class.

Rank #2
Custom Asset Tags - Asset Labels with Barcodes - 1.2” x 0.7” (100-5000 Labels)
  • CUSTOM ASSET LABELS - Personalize the labels with your company or organization name. Enter a prefix and starting number, we will create and sequentially order the barcodes (CODE-128).
  • SIZING - Each asset tag measures 1.2" × 0.7".
  • DURABILITY - Our waterproof labels are laminated and designed for both indoor and outdoor use.
  • STRONG ADHESIVE - Can be removed without damaging the item.
  • MULTIPLE QUANTITIES - Quantities Range from 100 labels to 5000 labels. Choose the perfect quantity of asset tags that suit your needs.

Query several servers and export results

Pass an array of server names directly:

$servers = 'SERVER01', 'SERVER02', 'SERVER03'

Get-CimInstance -ClassName Win32_SystemEnclosure `
    -ComputerName $servers |
    Select-Object PSComputerName, Manufacturer, Model, SerialNumber, SMBIOSAssetTag

For a longer list, put one server name per line in servers.txt and load it with Get-Content. To create a CSV, pipe the results to Export-Csv:

$servers = Get-Content -Path .servers.txt

Get-CimInstance -ClassName Win32_SystemEnclosure `
    -ComputerName $servers |
    Select-Object PSComputerName, Manufacturer, Model, SerialNumber, SMBIOSAssetTag |
    Export-Csv -Path .server-asset-tags.csv -NoTypeInformation

This concise version can leave failed hosts out of the output. For an inventory run, capture errors as rows so the CSV shows which servers need attention:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
$servers = Get-Content -Path .servers.txt

$results = foreach ($server in $servers) {
    try {
        $enclosures = Get-CimInstance `
            -ClassName Win32_SystemEnclosure `
            -ComputerName $server `
            -ErrorAction Stop

        foreach ($item in $enclosures) {
            $tag = if ($null -ne $item.SMBIOSAssetTag) {
                $item.SMBIOSAssetTag.ToString().Trim()
            } else {
                $null
            }

            [pscustomobject]@{
                ComputerName = $server
                Manufacturer = $item.Manufacturer
                Model        = $item.Model
                SerialNumber = $item.SerialNumber
                AssetTag     = $tag
                Error        = $null
            }
        }
    }
    catch {
        [pscustomobject]@{
            ComputerName = $server
            Manufacturer = $null
            Model        = $null
            SerialNumber = $null
            AssetTag     = $null
            Error        = $_.Exception.Message
        }
    }
}

$results | Export-Csv -Path .server-asset-tags.csv -NoTypeInformation

The Trim() call removes leading or trailing whitespace. The error column preserves connection and permission failures rather than making a partial inventory look complete.

Reuse a CIM session for repeated queries

When several CIM operations target the same machines, a reusable session avoids creating a separate connection for each operation. Create and clean up sessions explicitly:

$session = New-CimSession -ComputerName SERVER01

try {
    Get-CimInstance -ClassName Win32_SystemEnclosure `
        -CimSession $session |
        Select-Object PSComputerName, Manufacturer, Model, SerialNumber, SMBIOSAssetTag
}
finally {
    Remove-CimSession $session
}

For several servers, create a session for each and remove them together:

Rank #3
Custom Asset Tags (Upload Your Logo) - Asset Labels with Barcodes - 2” x 0.7” (50-5000 Labels)
  • CUSTOM ASSET LABELS - Upload your logo and personalize the labels with your company or organization name. Enter a prefix and starting number, we will create and sequentially order the barcodes (CODE-128).
  • SIZING - Each asset tag measures 2" × 0.7".
  • DURABILITY - Our waterproof labels are laminated and designed for both indoor and outdoor use.
  • STRONG ADHESIVE - Can be removed without damaging the item.
  • MULTIPLE QUANTITIES - Quantities Range from 50 labels to 5000 labels. Choose the perfect quantity of asset tags that suit your needs.
$sessions = New-CimSession -ComputerName SERVER01, SERVER02, SERVER03

try {
    Get-CimInstance -ClassName Win32_SystemEnclosure `
        -CimSession $sessions |
        Select-Object PSComputerName, Manufacturer, Model, SerialNumber, SMBIOSAssetTag
}
finally {
    $sessions | Remove-CimSession
}

Microsoft documents session creation in the New-CimSession reference. If WS-Man is unavailable but your network and security policy permit DCOM, a DCOM session may be an alternative:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
$option = New-CimSessionOption -Protocol Dcom
$session = New-CimSession -ComputerName SERVER01 -SessionOption $option

try {
    Get-CimInstance -ClassName Win32_SystemEnclosure -CimSession $session
}
finally {
    Remove-CimSession $session
}

DCOM has its own firewall and security requirements; do not change those settings without following your environment’s policy.

Asset tag, serial number, and service tag are different identifiers

These values may be related in an organization’s inventory, but they are not interchangeable by definition:

Identifier Typical PowerShell source What it generally represents
Asset tag Win32_SystemEnclosure.SMBIOSAssetTag An organization’s inventory identifier reported in the chassis asset-tag field.
Enclosure serial number Win32_SystemEnclosure.SerialNumber The enclosure’s manufacturer-provided serial number, when reported.
BIOS serial number or vendor service tag Win32_BIOS.SerialNumber A manufacturer identifier; the term and its use vary by vendor.

To compare the values rather than guess which one your organization uses:

$bios      = Get-CimInstance -ClassName Win32_BIOS
$enclosure = Get-CimInstance -ClassName Win32_SystemEnclosure

[pscustomobject]@{
    BiosSerialNumber = $bios.SerialNumber
    EnclosureSerial  = $enclosure.SerialNumber
    AssetTag         = $enclosure.SMBIOSAssetTag
}

For example, Dell’s instructions use Win32_BIOS.SerialNumber to retrieve a Dell service tag. That is not the same query as the standard chassis asset-tag field. Dell’s service-tag guidance describes its vendor-specific terminology. Do not substitute a serial number for an asset tag unless your inventory rules explicitly define that mapping.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
IntelliScanner Asset Tags (Roll of 500 - Customized)
  • Custom printed barcode tags with your company or family name make it easy to organize everything
  • Each tag has a unique, 7 or 8 digit barcode - we never print the same barcode twice!
  • High durability polypropylene construction, printed with high quality resin for long life
  • Industry-standard Code 39 barcodes (not UPC/EAN compatible)

Why an asset tag may be blank or unexpected

An empty, whitespace-only, generic, or placeholder value means the provider did not report a usable tag; it does not by itself prove the command is wrong. The standard query reads data supplied through firmware/SMBIOS. Microsoft notes that hardware information may be unavailable or incorrectly configured by manufacturers in its computer information collection guidance.

  • The tag was never programmed. Firmware may contain no organization asset tag.
  • The value is stored elsewhere. A vendor management provider or inventory system may hold a value that the standard SMBIOS field does not expose.
  • The target is a virtual machine. A hypervisor may provide generic chassis data, synthesize a value, or expose no meaningful physical-host tag.
  • Firmware data is incomplete or malformed. Check for whitespace or vendor placeholders before treating a value as valid.
  • The remote query is blocked. Access denied usually points to account rights; a connection failure can indicate reachability, protocol, firewall, or name-resolution problems.

Inspect the complete object and related fields:

Get-CimInstance -ClassName Win32_SystemEnclosure | Format-List *

Get-CimInstance -ClassName Win32_SystemEnclosure |
    Select-Object Name, Manufacturer, Model, SerialNumber, SMBIOSAssetTag, PartNumber, SKU, Tag

If the standard field is empty but the asset information is available in a vendor management provider or API, use that source deliberately and document its meaning. Vendor-specific tools can expose more data, but are less portable across manufacturers.

For remote failures, verify the hostname and reachability, account permissions, and the CIM protocol allowed by the server’s firewall and policy. If you receive Access is denied, use an account with appropriate remote WMI/CIM rights or an approved credential. If the class is reported missing, confirm the command runs against Windows and test another standard class, such as Get-CimInstance -ClassName Win32_BIOS. You can inspect class availability with:

Get-CimClass -Namespace rootcimv2 -ClassName Win32_SystemEnclosure

Do not rebuild the WMI repository as an initial troubleshooting step; diagnose provider and repository health first.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Windows and PowerShell version notes

This is a Windows CIM/WMI inventory query, not a cross-platform hardware-inventory command. PowerShell 7 on Windows can use the Windows CIM cmdlets when the target exposes the relevant provider. A Linux or macOS machine does not provide Win32_SystemEnclosure in the same Windows WMI sense. The remote server needs to expose WMI/CIM access, but does not necessarily need PowerShell installed for this query; see Microsoft’s WMI and Get-CimInstance documentation.

Best Value
McAuley Labels Custom Silver Asset Tags for Equipment, Barcode, 1.5x0.75 in
  • Instantly Improve Asset Tracking: Take control of inventory management with durable and customizable asset tags that resist water, scratches, and fading. Whether labeling tools, IT equipment, or machinery, your barcode labels ensure seamless tracking and security
  • Multiple Variations & Sizes for Your Needs: Choose from Metalized Silver, Heavy-Duty 3M Adhesive, or Semi-Gloss White Polyester asset tags. Available in standard 2x1” and 1.5x0.75” sizes, with custom color and sizing options to fit your inventory tracking requirements
  • Precision Printing & High-Contrast Visibility: Your barcode labels and serial number stickers feature sharp, high-contrast printing, making them easy to scan in any lighting condition. Perfect for fast inventory management, security tracking, and equipment identification
  • Strong Adhesion for Reliable Labeling: Featuring industrial-strength adhesive, your permanent labels bond securely to metal, plastic, and textured surfaces. Whether for laptops, servers, or machinery, they stay put with no peeling or fading
  • Built to Last, Unlike the Rest: McAuley asset tags are built to last - unlike flimsy stickers that fade, smudge, or peel. With high-contrast, easy-to-scan barcodes, they ensure precise asset tracking and long-term durability in any environment

Get-WmiObject -Class Win32_SystemEnclosure is a legacy form you may encounter in older scripts. For new scripts, use Get-CimInstance, which is the modern CIM-cmdlet approach and supports local and remote CIM queries. You can also request selected fields with WQL:

Get-CimInstance -Query 'SELECT Manufacturer, Model, SerialNumber, SMBIOSAssetTag FROM Win32_SystemEnclosure'

See Microsoft’s WQL documentation for query syntax.

Frequently Asked Questions

Can PowerShell set the asset tag?

The commands here read the value reported by SMBIOS; they do not set it. Whether a tag can be changed depends on the server manufacturer’s firmware or management tools and your organization’s process.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Can I use the serial number if the asset tag is blank?

You can record the serial number as a separate identifier, but do not label it as an asset tag. Only use it as a fallback field if your inventory process explicitly defines that behavior.

Does a blank value prove the server has no asset tag?

No. It means this provider did not return a usable SMBIOS asset-tag value. Check firmware data, virtual-machine status, and any vendor-specific inventory provider.

Quick Recap

Bestseller No. 2
Custom Asset Tags - Asset Labels with Barcodes - 1.2” x 0.7” (100-5000 Labels)
Custom Asset Tags - Asset Labels with Barcodes - 1.2” x 0.7” (100-5000 Labels)
SIZING - Each asset tag measures 1.2" × 0.7".; STRONG ADHESIVE - Can be removed without damaging the item.
$12.95
Bestseller No. 3
Custom Asset Tags (Upload Your Logo) - Asset Labels with Barcodes - 2” x 0.7” (50-5000 Labels)
Custom Asset Tags (Upload Your Logo) - Asset Labels with Barcodes - 2” x 0.7” (50-5000 Labels)
SIZING - Each asset tag measures 2" × 0.7".; STRONG ADHESIVE - Can be removed without damaging the item.
$12.95
Bestseller No. 4
IntelliScanner Asset Tags (Roll of 500 - Customized)
IntelliScanner Asset Tags (Roll of 500 - Customized)
Each tag has a unique, 7 or 8 digit barcode - we never print the same barcode twice!; High durability polypropylene construction, printed with high quality resin for long life
$79.00

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.