See the sample scripts located at <SDK_Root>\Windows\Intel_AMT\Samples\WMI that demonstrate use of the Intel ME WMI provider.
For information about programming management applications using the WMI Provider, see the WMI documentation in the Microsoft .NET Framework SDK.
The following snippets also show how to use the features of the Intel ME WMI provider.
Enumerating Certificate Hashes
This VBscript enumerates all instances in AMT_ProvisioningCertificateHash class.
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\Intel_ME")
Set colItems = objWMIService.ExecQuery( _
"SELECT * FROM AMT_ProvisioningCertificateHash",,48)
For Each objItem in colItems
Wscript.Echo "-----------------------------------"
Wscript.Echo "AMT_ProvisioningCertificateHash instance"
Wscript.Echo "-----------------------------------"
Wscript.Echo "Caption: " & objItem.Caption
Wscript.Echo "Description: " & objItem.Description
Wscript.Echo "ElementName: " & objItem.ElementName
Wscript.Echo "Enabled: " & objItem.Enabled
Wscript.Echo "Expires: " & objItem.Expires
If isNull(objItem.HashData) Then
Wscript.Echo "HashData: "
Else
Wscript.Echo "HashData: " & Join(objItem.HashData, ",")
End If
Wscript.Echo "HashType: " & objItem.HashType
Wscript.Echo "InstanceID: " & objItem.InstanceID
Wscript.Echo "IsDefault: " & objItem.IsDefault
Wscript.Echo "Issued: " & objItem.Issued
Next
Retrieving the PID
This VBscript retrieves the PID of the platform.
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\Intel_ME")
' no InParameters to define
' Execute the method and obtain the return status.
' The OutParameters object in objOutParams
' is created by the provider.
Set objOutParams = objWMIService.ExecMethod("OOB_Service", "GetPID")
' List OutParams
Wscript.Echo "Out Parameters: "
Wscript.echo "PID: " & objOutParams.PID
Wscript.echo "ReturnValue: " & objOutParams.ReturnValue
Copyright © 2006-2022, Intel Corporation. All rights reserved. |