Intel® AMT: Getting UUID via WMI

By Gael Holmes Hofemeier (Intel) (132 posts) on June 12, 2009 at 12:40 pm

We are often asked how we can get the UUID of a system outside of having AMT enabled on a system. The problem here being that sometimes there are AMT systems in an environment that have never been enabled (this is sad, I know...) and for whatever reason they many not have the ME/LMS drivers installed, which would allow them to run the AMT Scan Tool in order to get information.

So without AMT Enabled, you can get the UUID from the OS via WinRM or WMI. No AMT Drivers need to be installed. Just save the text below to a .vbs file and run.

---------------------------------

' WMI To get UUID

' Script Name: GetUUID.vbs

Option Explicit

Dim objWMIService, objItem, colItems, strComputer

' On Error Resume Next

strComputer = "."

' WMI connection to Root CIM

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystemProduct")

' Classic For Next Loop

For Each objItem in colItems

Wscript.Echo "UUID: " & objItem.UUID

Next

‘End of script

Categories: Manageability & Security
Tags: ,

For more complete information about compiler optimizations, see our Optimization Notice.

Comments (4)

June 12, 2009 2:24 PM PDT

Andrew Schiestl (Intel)
Andrew Schiestl (Intel)Total Points:
6,558
Green Belt
If you don't need to obtain it programatically (for example, you just want to check the UUID of a specific machine), there's an even easier way to use WMI to get the UUID. Both Windows XP and Vista have a command line utility called wmic that can make wmi queries (Win 7 might, I haven't had a chance to check yet).

Just type the following at a command line:
'wmic path win32_computersystemproduct get uuid'
June 12, 2009 3:04 PM PDT

Gael Holmes Hofemeier (Intel)
Gael Holmes Hofemeier (Intel)Total Points:
23,299
Black Belt
Thanks Andy!
June 15, 2009 1:25 PM PDT

Andrew Schiestl (Intel)
Andrew Schiestl (Intel)Total Points:
6,558
Green Belt
An equivilent with Winrm from the command line (which will work in Windows Vista and Windows 7, and will work on Windows XP with the appropriate download) is:

'winrm e http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/win.....temProduct'
June 29, 2010 6:31 AM PDT


Heitor
Do you have this example in C++? thanks

Trackbacks (2)


Leave a comment  

To obtain technical support, please go to Software Support.
Name (required)*

Email (required; will not be displayed on this page)*

Your URL (optional)


Comment*