Intel® AMT: Getting UUID via WMI

By Gael Holmes (Intel) (91 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

Comments (3)

June 12, 2009 3:24 PM PDT

Andrew Schiestl (Intel)
Total Points:
3,413
Status Points:
2,913
Brown 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 4:04 PM PDT

Gael Holmes (Intel)
Total Points:
14,363
Status Points:
14,363
Black Belt
Thanks Andy!
June 15, 2009 2:25 PM PDT

Andrew Schiestl (Intel)
Total Points:
3,413
Status Points:
2,913
Brown 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'

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*