$auditLogRef = $wsmanConnectionObject.NewReference("SELECT * FROM AMT_AuditLog WHERE Name='Intel(r) AMT:Audit Log'") $auditLogInstance = $auditLogRef.Get() $auditState = $auditLogInstance.GetProperty("AuditState") $percentageFree = $auditLogInstance.GetProperty("PercentageFree") $currentNumberOfRecords = $auditLogInstance.GetProperty("CurrentNumberOfRecords") $maxAllowedAuditors = $auditLogInstance.GetProperty("MaxAllowedAuditors") $timeOfLastRecord = $auditLogInstance.GetProperty("TimeOfLastRecord") $fwVersion = GetCoreVersion if($fwVersion.ToString() -ge "5.1") { $timeOfLastRecord = $timeOfLastRecord.InternalObject.Text }