Microsoft® Windows® 2000 Scripting Guide
« Previous | Next »
Computers are typically identified by name. This practice provides a convenient way to distinguish one computer from another, but it is not always sufficient for uniquely identifying computers; after all, computer names are easily, and often, changed. To track individual computers, you should always use a more immutable identifier, such as the serial number or the asset tag number.
The SMBIOS specification enables manufacturers to store extended information in the BIOS, including unique identifiers such as the serial number and the asset tag number. Retrieving the serial number or the asset tag number can help identify a specific computer. For example, each computer has a unique serial number that does not change unless the BIOS is replaced. Because you are far less likely to replace a BIOS than to rename a computer, the BIOS serial number provides a good way to identify computers.
Identifying information such as serial number and asset tag can be retrieved from a computer by using the WMI Win32_SystemEnclosure class.
Note
Table 8.3 lists the SMBIOS-related properties of the Win32_SystemEnclosure class.
Table 8.3 Win32_SystemEnclosure Properties
Property | Description |
---|---|
PartNumber | Part number assigned by the organization responsible for producing or manufacturing the computer. |
SerialNumber | Manufacturer-allocated number used to identify the computer. |
SKU | Stock-keeping unit number for the computer. |
SMBIOSAssetTag | Asset tag number of the computer. |
Listing 8.3 contains a script that retrieves identifying information for a computer. To carry out this task, the script must perform the following steps:
This query returns a collection consisting of the physical properties of the computer and its housing.
Listing 8.3 Retrieving Identifying Information
|
|
Send us your feedback | « Previous | Next » |