I am trying to create a report that can tell whether a TPM is present or not.
I have used a few old community posts about TPM presence and have also come up with queries from "scratch" and I can't find a consistent answer. I have a few systems I know are encrypted using Sophos and Lansweeper is saying they don't have TPM's at all or LS is saying their TPMs are not active. Here are a few snippets of code:
Select Distinct Top 1000000 tsysAssetTypes.AssetTypeIcon16 As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
Case When tblTPM.IsActivated_InitialValue = 0 Then 'Deactivated0'
When tblTPM.IsActivated_InitialValue = 1 Then 'Activated1'
Else 'Not Present' End As TPMActivation,
tblOperatingsystem.Caption As OS,
Case
When tblOperatingsystem.Caption In ('Microsoft Windows 7 Professional',
'Microsoft Windows 7 å°ˆæ¥ç‰ˆ', 'Microsoft Windows XP Professional',
'Microsoft Windows 7 Professional K') Then 'NO'
When tblOperatingsystem.Caption Not In ('Microsoft Windows 7 Professional',
'Microsoft Windows 7 å°ˆæ¥ç‰ˆ', 'Microsoft Windows XP Professional',
'Microsoft Windows 7 Professional K') Then 'YES' Else 'UNKNOWN'
End As SupportedOS,
tblAssets.Username,
tblAssets.IPAddress,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model
From tblAssets
Inner Join tsysAssetTypes On tblAssets.Assettype = tsysAssetTypes.AssetType
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblSystemEnclosure On tblSystemEnclosure.AssetID =
tblAssets.AssetID
Left Join tblTPM On tblAssets.AssetID = tblTPM.AssetId
Left Join tblOperatingsystem On tblAssets.AssetID = tblOperatingsystem.AssetID
Where tblAssets.AssetName Not Like 'SC%' And tblAssets.AssetName Not In
(1234, 12345, 123456)
And tblSystemEnclosure.ChassisTypes In ('8', '9', '10', '21', '31',
'32')
&
Select Top 1000000 tsysAssetTypes.AssetTypeIcon16 As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblTPM.SpecVersion,
tblTPM.ManufacturerVersion,
tblTPM.ManufacturerVersionInfo,
Case When tblTPM.IsActivated_InitialValue = 1 Then 'Yes' Else 'No'
End As Activated,
Case When tblTPM.IsEnabled_InitialValue = 1 Then 'Yes' Else 'No'
End As Enabled,
Case When tblTPM.IsOwned_InitialValue = 1 Then 'Yes' Else 'No' End As Owned,
tblTPM.PhysicalPresenceVersionInfo,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.IPAddress,
tblAssets.Description,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Location,
tsysIPLocations.IPLocation,
tsysOS.OSname As OS,
tblAssets.SP As SP,
tblAssets.Firstseen,
tblAssets.Lastseen
From tblTPM
Inner Join tblAssets On tblTPM.AssetId = tblAssets.AssetID
Inner Join tsysAssetTypes On tblAssets.Assettype = tsysAssetTypes.AssetType
Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tblPortableBattery
On tblAssets.AssetID = tblPortableBattery.AssetID
Order By tblAssets.AssetName
Both of these snippets of code run and populate data, but they are not accurate. I have a few systems that I know are encrypted and some that are not and neither of them are falling in line with what LS is reporting. Has anyone else had this issue? Am I missing something in the code? Any support would be great.
*Asset names for parsing are fillers, not what is actually in the query.