16 lines
886 B
PowerShell
16 lines
886 B
PowerShell
$auditLogRef = $wsmanConnectionObject.NewReference("SELECT * FROM AMT_AuditLog WHERE Name='Intel(r) AMT:Audit Log'")
|
|
$inputObject = $auditLogRef.CreateMethodInput("ReadRecords")
|
|
$inputObject.SetProperty("StartIndex","1")
|
|
$outputObject = $auditLogRef.InvokeMethod($inputObject)
|
|
$returnValue = $outputObject.GetProperty("ReturnValue")
|
|
if($returnValue -like "0")
|
|
{
|
|
$totalRecordCount = $outputObject.GetProperty("TotalRecordCount")
|
|
$recordsReturned = $outputObject.GetProperty("RecordsReturned")
|
|
$eventRecords = $outputObject.GetProperty("EventRecords")
|
|
$eventRecordsBytes = [System.Convert]::FromBase64String($eventRecords.Item(0))
|
|
$toBits1 = [system.Convert]::ToString($eventRecordsBytes[0], 2)
|
|
$toBits2 = [system.Convert]::ToString($eventRecordsBytes[1], 2)
|
|
$toBits1 = [string]::Join("", $toBits2)
|
|
$auditAppID = [system.Convert]::ToInt32($toBits1, 2)
|
|
} |